RE: [PoC] pg_upgrade: allow to upgrade publisher node
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Bruce Momjian <bruce@momjian.us>, Julien Rouhaud <rjuju123@gmail.com>, vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Date: 2023-08-16T10:25:03Z
Lists: pgsql-hackers
Attachments
- v21-0001-Always-persist-to-disk-logical-slots-during-a-sh.patch (application/octet-stream) patch v21-0001
- v21-0002-pg_upgrade-Allow-to-replicate-logical-replicatio.patch (application/octet-stream) patch v21-0002
- v21-0003-pg_upgrade-Add-check-function-for-logical-replic.patch (application/octet-stream) patch v21-0003
Dear hackers, > > > It was primarily for upgrade purposes only. So, as we can't see a good reason > to > > > go via pg_dump let's do it in upgrade unless someone thinks otherwise. > > > > Removed the new option in pg_dump and modified the pg_upgrade > > directly use the slot info to restore the slot in new cluster. > > In this version, creations of logical slots are serialized, whereas old ones were > parallelised per db. Do you it should be parallelized again? I have tested locally > and felt harmless. Also, this approch allows to log the executed SQLs. I updated the patch to allow parallel executions. Workers are launched per slots, each one connects to the new node via psql and executes pg_create_logical_replication_slot(). Moreover, following points were changed for 0002. * Ensured to log executed SQLs for creating slots. * Fixed an issue that 'unreserved' slots could not be upgrade. This change was not expected one. Related discussion was [1]. * Added checks for output plugin libraries. pg_upgrade ensures that plugins referred by old slots were installed to the new executable directory. [1]: https://www.postgresql.org/message-id/TYAPR01MB5866FD3F7992A46D0457F0E6F50BA%40TYAPR01MB5866.jpnprd01.prod.outlook.com Best Regards, Hayato Kuroda FUJITSU LIMITED
Commits
-
Fix issues in binary_upgrade_logical_slot_has_caught_up().
- 0bf62460bb9e 17.0 landed
-
Fix a random failure in 003_logical_slots.pl.
- 63c5df126abb 17.0 landed
-
Fix a test in 003_logical_slots.
- 3e36e48d8efe 17.0 landed
-
Fix uninitialized slot array access during the upgrade.
- a7db71ed2787 17.0 landed
-
Fix the test 003_logical_slots.
- 8af917be6bad 17.0 landed
-
Commit b195e6d482 forgot to update meson.build.
- 8949b978ff49 17.0 landed
-
Use shorter file names in the upgrade logical slots test.
- b195e6d482b8 17.0 landed
-
Migrate logical slots to the new node during an upgrade.
- 29d0a77fa660 17.0 landed
-
Flush logical slots to disk during a shutdown checkpoint if required.
- e0b2eed047df 17.0 landed
-
Prevent possibility of panics during shutdown checkpoint.
- c6c333436491 10.0 cited