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: 'vignesh C' <vignesh21@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Julien Rouhaud <rjuju123@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2023-08-02T08:13:14Z
Lists: pgsql-hackers
Dear Vignesh, Thank you for making the PoC! > Here is a patch which checks that there are no WAL records other than > CHECKPOINT_SHUTDOWN WAL record to be consumed based on the discussion > from [1]. Basically I agreed your approach. Thanks! > Patch 0001 and 0002 is same as the patch posted by Kuroda-san, Patch > 0003 exposes pg_get_wal_records_content to get the WAL records along > with the WAL record type between start and end lsn. pg_walinspect > contrib module already exposes a function for this requirement, I have > moved this functionality to be exposed from the backend. Patch 0004 > has slight change in check function to check that there are no other > records other than CHECKPOINT_SHUTDOWN to be consumed. The attached > patch has the changes for the same. > Thoughts? > > [1] - > https://www.postgresql.org/message-id/CAA4eK1Kem-J5NM7GJCgyKP84pEN6 > RsG6JWo%3D6pSn1E%2BiexL1Fw%40mail.gmail.com Few comments: * Per comment from Amit [1], I used pg_get_wal_record_info() instead of pg_get_wal_records_info(). This function extract a next available WAL record, which can avoid huge scan if the confirmed_flush is much behind. * According to cfbot and my analysis, the 0001 cannot pass the test on macOS. So I revived Julien's patch [2] as 0002 once. AFAIS the 0001 is not so welcomed. Next patch will be available soon. [1]: https://www.postgresql.org/message-id/CAA4eK1LWKkoyy-p-SAT0JTWa%3D6kXiMd%3Da6ZcArY9eU4a3g4TZg%40mail.gmail.com [2]: https://www.postgresql.org/message-id/20230414061248.vdsxz2febjo3re6h%40jrouhaud 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