Re: Logical replication existing data copy

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical replication existing data copy
Date: 2017-03-20 23:54:20
Message-ID: 3ab1504f-558a-c1d4-a088-aba0aa028f16@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20/03/17 21:25, Stephen Frost wrote:
> Peter,
>
> * Peter Eisentraut (peter(dot)eisentraut(at)2ndquadrant(dot)com) wrote:
>> The current patch causes a failure in the pg_dump tests, because the
>> generated CREATE SUBSCRIPTION commands make connection attempts that
>> don't work. We have the pg_dump option --no-create-subscription-slots
>> for this, but I suppose we should expand that to
>> --no-subscription-connect and use the new NOCONNECT option instead.
>
> I'll admit that I've not followed this very closely, so perhaps I'm
> misunderstanding, but I thought our prior discussion lead to the idea
> that pg_dump would always dump out subscriptions with 'NOCONNECT', so
> that a restore wouldn't automatically start trying to connect to another
> system.
>
> In which case, I don't quite understand why we need a
> "--no-subscription-connect" option.
>

Yeah I think that was the agreement as well.

Here is fixed version, also rebased on top of all the changes to pg_dump
tests. Subscriptions are dumped unless --no-subscriptions is specified.
They are dumped with NOCONNECT option (which didn't exist before this
patch so it was bit harder to do the dump by default).

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

Attachment Content-Type Size
0001-Logical-replication-support-for-initial-data-copy.patch text/x-patch 187.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-03-20 23:56:40 Re: logical replication apply to run with sync commit off by default
Previous Message David Rowley 2017-03-20 23:46:27 Re: extended statistics: n-distinct