Hi, During the review of the conflict log table patch, it was suggested that subscription OID preservation be split into a separate patch at [1], as it is also needed for the commit timestamp upgrade work. Accordingly, the first patch handles subscription OID preservation, while the second patch handles preserving conflict log tables and conflict_log_destination across upgrades.
0001: Preserve subscription OIDs across pg_upgrade In binary-upgrade mode, pg_dump emits binary_upgrade_set_next_pg_subscription_oid() before each CREATE SUBSCRIPTION, and CreateSubscription() uses this OID instead of assigning a new one. This requires adding a new pg_upgrade_support function and therefore a catversion bump. The change is independent of conflict log tables and is also needed for the upcoming commit timestamp upgrade at [2]. 0002: Preserve conflict log tables and conflict_log_destination during upgrade The name of a conflict log table is derived from the subscription OID, and the table is referenced through pg_subscription.subconflictlogrelid. In binary-upgrade mode, pg_dump now dumps conflict log tables with their original OIDs, along with their privileges, comments, and security labels. CreateSubscription() links the subscription to the already restored conflict log table and reports an error if the table is missing. A conflict log table is dumped only when its subscription is also selected for dumping. In normal mode, conflict log tables and their associated metadata are not dumped, since the tables are created again when the subscription is restored. The ACLs of the pg_conflict schema are dumped in the same way as those of pg_catalog. This version only splits the v98 patch posted at [3] into two patches; there are no other changes. [1] - https://www.postgresql.org/message-id/CAA4eK1%2Bz29LbhwRqJy9KXV%2B1s2a7hkqq5MGX1WYvcQ%3DwkkpK%3DQ%40mail.gmail.com [2] - https://www.postgresql.org/message-id/CAFPTHDa5aP8ixTZBygGAe48E1N=dvupzcxikw7bnkixlmn3...@mail.gmail.com [3] - https://www.postgresql.org/message-id/CALDaNm08sHU%3DBowHwEdurWt0-XwsAYB0drL_1%3DS-_XJC4atnqQ%40mail.gmail.com Regards, Vignesh
0001-Preserve-subscription-OIDs-across-pg_upgrade.patch
Description: Binary data
0002-Preserve-conflict-log-tables-and-conflict_log_destin.patch
Description: Binary data
