Re: Logical replication existing data copy

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Logical replication existing data copy
Date: 2017-03-14 16:12:24
Message-ID: 85b5661d-4e7a-9c09-33ec-e1e07c0f1ac3@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13/03/17 03:57, Craig Ringer wrote:
> On 11 March 2017 at 00:33, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com> wrote:
>> On 09/03/17 18:48, Peter Eisentraut wrote:
>>> On 3/6/17 05:27, Petr Jelinek wrote:
>>>> And lastly I changed the automagic around exporting, not exporting and
>>>> using the snapshot produced by CREATE_REPLICATION_SLOT into explicit
>>>> parameter for the CREATE_REPLICATION_SLOT command (and added simple
>>>> framework for adding more of those if needed in the future).
>>>
>>> It might be useful to make this into a separate patch, for clarity.
>>>
>>
>> Okay here it is with this part split out. The first patch also help with
>> Craig's logical decoding on standby so it definitely makes sense to be
>> split.
>
> Greatly appreciated.
>
> Committing this in chunks makes sense anyway.
>
> I've attached a slightly version that makes pg_recvlogical skip slot
> export. The second patch is unchanged, use the copy from the
> immediately prior mail.
>

Okay, I merged your changes in.

Here is that merge, plus the updated main patch that replaces all the
SQL interaces in libpqwalreceiver.c with single exec one which uses
tuplestore to send any tuple results back.

For correct working in every situation, it still needs to snapbuild
fixes and also the logical replication origin tracking fix.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Add-option-to-control-snapshot-export-to-CREATE_REPL.patch binary/octet-stream 15.7 KB
0002-Logical-replication-support-for-initial-data-copy.patch binary/octet-stream 171.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-03-14 16:13:28 Re: Should buffer of initialization fork have a BM_PERMANENT flag
Previous Message Joe Conway 2017-03-14 16:08:19 Re: scram and \password