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


Reply via email to