Stabilize recently added tests in 051_effective_wal_level.pl. Commit 1f2245371e3 added a test for the case where logical decoding is disabled and re-enabled while synchronizing a replication slot. Its cleanup assumed the slot re-created on retry would still be temporary, and so would be gone once the corresponding remote slot was dropped. That isn't guaranteed: the catalog_xmin reserved on the standby is not necessarily ahead of the remote slot's. In that case the slot is persisted on the first retry, and the subsequent logical decoding deactivation invalidates it on the standby rather than dropping it, so the check that no synced slot is left behind fails.
Stabilize the cleanup by calling an extra pg_sync_replication_slots() after dropping the remote slot and before disabling logical decoding on the primary. Per buildfarm member skink. Reported-by: Fujii Masao <[email protected]> Suggested-by: Fujii Masao <[email protected]> Reviewed-by: shveta malik <[email protected]> Discussion: https://postgr.es/m/cahgqgwfwxasacrnhhjgedk8nwylw4blldhieiksqbqd+tzj...@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d64e5357485534f8aca4b700bde6c9145fdb243b Modified Files -------------- src/test/recovery/t/051_effective_wal_level.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
