Re: [PATCH] Add `truncate` option to subscription commands

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [PATCH] Add `truncate` option to subscription commands
Дата
Msg-id CAA4eK1+n5V_hE+vvKz9Nn1z3S9D6RArL3Nw5MK3yx2pVcicq7Q@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Add `truncate` option to subscription commands  (David Christensen <david@endpoint.com>)
Ответы Re: [PATCH] Add `truncate` option to subscription commands  (David Christensen <david@endpoint.com>)
Список pgsql-hackers
On Sat, Oct 10, 2020 at 12:24 AM David Christensen <david@endpoint.com> wrote:
>
> -hackers,
>
> Enclosed find a patch to add a “truncate” option to subscription commands.
>
> When adding new tables to a subscription (either via `CREATE SUBSCRIPTION` or `REFRESH PUBLICATION`), tables on the
targetwhich are being newly subscribed will be truncated before the data copy step.  This saves explicit coordination
ofa manual `TRUNCATE` on the target tables and allows the results of the initial data sync to be the same as on the
publisherat the time of sync. 
>

So IIUC, this will either truncate all the tables for a particular
subscription or none?  Is it possible that the user wants some of
those tables to be truncated which made me think what exactly made you
propose this feature? Basically, is it from user complaint, or is it
some optimization that you think will be helpful to users?

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: SEARCH and CYCLE clauses