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: Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2023-04-20T05:31:16Z
Lists: pgsql-hackers
Attachments
- v8-0001-pg_upgrade-Add-include-logical-replication-slots-.patch (application/octet-stream) patch v8-0001
- v8-0002-Always-persist-to-disk-logical-slots-during-a-shu.patch (application/octet-stream) patch v8-0002
- v8-0003-pg_upgrade-Add-check-function-for-include-logical.patch (application/octet-stream) patch v8-0003
Dear Vignesh, Thank you for reviewing! PSA new patchset. > > Additionally, I added a checking functions in 0003 > > According to pg_resetwal and other functions, the length of > CHECKPOINT_SHUTDOWN > > record seems (SizeOfXLogRecord + SizeOfXLogRecordDataHeaderShort + > sizeof(CheckPoint)). > > Therefore, the function ensures that the difference between current insert > position > > and confirmed_flush_lsn is less than (above + page header). > > Logical replication slots can be created only if wal_level >= logical, > currently we do not have any check to see if wal_level >= logical if > "--include-logical-replication-slots" option is specified. If > include-logical-replication-slots is specified with pg_upgrade, we > will be creating replication slots after a lot of steps like > performing prechecks, analyzing, freezing, deleting, restoring, > copying, setting related objects and then create replication slot, > where we will be erroring out after a lot of time(Many cases > pg_upgrade takes a lot of hours to perform these operations). I feel > it would be better to add a check in the beginning itself somewhere in > check_new_cluster to see if wal_level is set appropriately in case of > include-logical-replication-slot option to detect and throw an error > early itself. I see your point. Moreover, I think max_replication_slots != 0 must be also checked. I added a checking function and related test in 0001. 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