Re: [HACKERS] Logical replication existing data copy

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] Logical replication existing data copy
Дата
Msg-id 4323fc2b-9410-cf12-b648-2b8d55603e9e@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Logical replication existing data copy  (Erik Rijkers <er@xs4all.nl>)
Ответы Re: [HACKERS] Logical replication existing data copy  (Erik Rijkers <er@xs4all.nl>)
Список pgsql-hackers
On 18/01/17 17:35, Erik Rijkers wrote:
> On 2017-01-18 14:46, Petr Jelinek wrote:
> 
>> 0001-Logical-replication-support-for-initial-data-copy-v2.patch
> 
> Applies and builds fine on top of the previous 5 patches.
> 
> Two problems:
> 
> 1.  alter_subscription.sgml has an unpaired <command>-tag, which breaks
> the doc-build:
> This is the offending patch-line:
> +      <command>CREATE SUBSCRIPTION</command> with <command>COPY
> DATA<command>
>

Hmm, I wonder how did that compile on my machine as it's indeed syntax
error.

> 
> 2. Running the below (a version of the earlier pgbench_derail.sh) I have
> found that
>    create subscription sub1  ..  with (disabled);  and then  alter
> subscription sub1 enable;
> cannot be run immediately, consecutively.  The error is avoided when the
> two
> commands are separated (for instance, below in separate psql- calls).
> 
> I don't understand why this is but it is reliably so.
>

AFAICS you should always get error from that test after you enable the
subscription, no matter if you enable immediately or later. The default
behavior is to copy the data and your test already copies them via
pg_dump/pg_restore.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (wasChanged SRF in targetlist handling)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)