pgsql: Stabilize recently added tests in 051_effective_wal_level.pl.

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Stabilize recently added tests in 051_effective_wal_level.pl.
Date: 2026-10-08 17:33:47
Message-ID: E1xEs03-00000000qAy-3bqQ@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <masao(dot)fujii(at)gmail(dot)com>
Suggested-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwFWXASACRnhHJgEdk8nWyLw4bLLDhiEiKSqBqd+tzJ2Pg@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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2026-10-08 17:33:51 pgsql: Stabilize recently added tests in 051_effective_wal_level.pl.
Previous Message Robert Haas 2026-10-08 17:00:23 pgsql: pg_plan_advice: Avoid miscategorizing partitionwise scans as ord