Re: Logical replication existing data copy

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Erik Rijkers <er(at)xs4all(dot)nl>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Logical replication existing data copy
Date: 2017-01-19 18:03:29
Message-ID: 0f48754e-6288-45ea-dfdb-05ed8eadc2da@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19/01/17 09:39, Erik Rijkers wrote:
> On 2017-01-18 20:45, Petr Jelinek wrote:
>>
>> AFAICS you should always get error from that test after you enable the
>
> Ah tes, you were right, of course; I had assumed the earlier mentioned
> CREATE SUBSCRIPTION ... [ WITH (COPY DATA | NOCOPY DATA) ]
> but that syntax wasn't implemented, I now understand.
>
> Taking that into account, my older tests work OK again (using the
> 7-patches below).
>

Good to hear.

>
> Other small issue: using this patch-set:
>
>> 0001-Add-PUBLICATION-catalogs-and-DDL-v18.patch
>> 0002-Add-SUBSCRIPTION-catalog-and-DDL-v18.patch
>> 0003-Define-logical-replication-protocol-and-output-plugi-v18.patch
>> 0004-Add-logical-replication-workers-v18fixed.patch
>> 0005-Add-separate-synchronous-commit-control-for-logical--v18.patch
>> 0001-Logical-replication-support-for-initial-data-copy-v2.patch
>> 0006-Add-RENAME-support-for-PUBLICATIONs-and-SUBSCRIPTION.patch
>
> ( This is now the patch-set to test, is that correct? )
>

The rename should be before this one, but I guess with v2 that didn't
work well yet as it didn't know about rename.

> make check complains:
>
> ***
> /home/aardvark/pg_stuff/pg_sandbox/pgsql.logical_replication/src/test/regress/expected/subscription.out
> 2017-01-19 09:26:41.354703032 +0100
> ---
> /home/aardvark/pg_stuff/pg_sandbox/pgsql.logical_replication/src/test/regress/results/subscription.out
> 2017-01-19 09:29:56.104685043 +0100
> ***************
> *** 53,62 ****
> COMMIT;
> ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
> \dRs
> ! List of subscriptions
> ! Name | Owner | Enabled | Publication
> ! -------------+---------------------------+---------+--------------------
> ! testsub_foo | regress_subscription_user | f | {testpub,testpub1}
> (1 row)
>
> DROP SUBSCRIPTION testsub_foo NODROP SLOT;
> --- 53,62 ----
> COMMIT;
> ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
> \dRs
> ! List of subscriptions
> ! Name | Owner | Enabled | Publication
> ! -------------+---------------------------+---------+-------------
> ! testsub_foo | regress_subscription_user | f | {testpub}
> (1 row)
>
> DROP SUBSCRIPTION testsub_foo NODROP SLOT;
>
> ======================================================================
>

Meh, I really messed up the rebase this time.

Okay, here is v3 with some small fixes and rebased on top of rename.
Also it's rebased without the
0005-Add-separate-synchronous-commit-control-for-logical--v18.patch as I
don't expect that one to go further for now.

Thanks for testing!

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

Attachment Content-Type Size
0001-Logical-replication-support-for-initial-data-copy-v3.patch text/plain 147.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-19 18:06:20 Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Previous Message Andrey Borodin 2017-01-19 17:47:54 Re: pg_background contrib module proposal