Hi, I was reviewing logical decoding of two-phase transactions feature, while reviewing the feature I was checking if there is any impact on publisher/subscriber upgrade.
I checked the existing pg_upgrade behaviour with logical replication. I made a logical replication data instance with publisher and subscriber with subscriber subscribed to a table. Then I tried upgrading publisher and subscriber individually. After upgrade I noticed the following: 1) Pg_logical/mappings files were not copied in the upgraded data folder: ------------------------------------------------------------------ Pg_logical contents in old data folder: publisher/pg_logical/replorigin_checkpoint publisher/pg_logical/mappings: map-32cb-4df-0_1767088-225-225 publisher/pg_logical/snapshots: 0-1643650.snap New upgraded data folder: publisher1/pg_logical/replorigin_checkpoint publisher1/pg_logical/mappings: publisher1/pg_logical/snapshots: 2) Replication slots were not copied: select * from pg_replication_slots; slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | t wo_phase -----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------+-- --------- (0 rows) 3) The subscriber is in disabled mode in the upgraded data: select * from pg_subscription; oid | subdbid | subname | subowner | subenabled | subbinary | substream | subtwophase | subconninfo | subslotname | subsynccommit | subpublicati ons -------+---------+---------+----------+------------+-----------+-----------+-------------+------------------------------------------+-------------+---------------+------------- ---- 16404 | 16401 | mysub | 10 | f | f | f | f | host=localhost port=5432 dbname=postgres | mysub | off | {mypub} (1 row) 4) The pg_subscription_rel contents also were not copied: select * from pg_subscription_rel; srsubid | srrelid | srsubstate | srsublsn ---------+---------+------------+---------- (0 rows) 5) While logical decoding of transactions, the decoded changes will be serialized based on logical_decoding_work_mem configuration. Even these files were not copied during upgrade. Do we support upgrading of logical replication, if it is supported could someone point me to the document link on how to upgrade logical replication? Regards, Vignesh