PG Docs for ALTER SUBSCRIPTION REFRESH PUBLICATION - copy_data option

Поиск
Список
Период
Сортировка
От Peter Smith
Тема PG Docs for ALTER SUBSCRIPTION REFRESH PUBLICATION - copy_data option
Дата
Msg-id CAHut+PtXzBV5UVU+6YDEwOcEkQdajVAyK4A6L5EMJvL9grkFsw@mail.gmail.com
обсуждение исходный текст
Ответы Re: PG Docs for ALTER SUBSCRIPTION REFRESH PUBLICATION - copy_data option  (Peter Smith <smithpb2250@gmail.com>)
Re: PG Docs for ALTER SUBSCRIPTION REFRESH PUBLICATION - copy_data option  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
Hi.

(For brevity, in this mail I refer to "ALTER SUBSCRIPTION sub REFRESH
PUBLICATION" as "ASRP")

--

The PG Docs for ASRP WITH (copy_data = true), says "(Previously
subscribed tables are not copied.)" [1].

I thought this rule meant that only tables which got added by ALTER
PUBLICATION pubname ADD TABLE ... [2] after the CREATE SUBSCRIPTION
would be affected by the copy_data.

But I recently learned that when there are partitions in the
publication, then toggling the value of the PUBLICATION option
"publish_via_partition_root" [3] can also *implicitly* change the list
published tables, and therefore that too might cause any ASRP to make
use of the copy_data value for those implicitly added
partitions/tables.

It seems a bit too subtle.

I was wondering if this should be made more obvious by a note added to
the PG Docs for the ASRP [1]. e.g. "Previously subscribed tables are
not copied. Note: Tables may also be newly subscribed by changes to
the publish_via_partition_root option [link]"

Or perhaps, the "publish_via_partition_root option" Docs [3] should
say something. e.g. "Note: Changing this option can affect the ASRP
copy_data [link].

Thoughts?

-----
[1] https://www.postgresql.org/docs/devel/sql-altersubscription.html
[2] https://www.postgresql.org/docs/devel/sql-alterpublication.html
[3] https://www.postgresql.org/docs/devel/sql-createpublication.html

Kind Regards,
Peter Smith.
Fujitsu Australia



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Decoding speculative insert with toast leaks memory
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: subscription/t/010_truncate.pl failure on desmoxytes in REL_13_STABLE