pgsql: Fix intermittent BF failures in 035_conflicts.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix intermittent BF failures in 035_conflicts.
Date: 2025-09-16 06:27:15
Message-ID: E1uyP9m-000xQ7-37@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix intermittent BF failures in 035_conflicts.

This commit addresses two sources of instability in the 035_conflicts
test:

Unstable VACUUM usage:
The test previously relied on VACUUM to remove a deleted column, which can
be unreliable due to concurrent background writer or checkpoint activity
that may lock the page containing the deleted tuple. Since the test
already verifies that replication_slot.xmin has advanced sufficiently to
confirm the feature's correctness, so, the VACUUM step is removed to
improve test stability.

Timing-sensitive retention resumption check:
The test includes a check to confirm that retention of conflict-relevant
information resumes after setting max_retention_duration to 0. However, in
some cases, the apply worker resumes retention immediately after the
inactive slot is removed from synchronized_standby_slots, even before
max_retention_duration is updated. This can happen if remote changes are
applied in under 1ms, causing the test to timeout while waiting for a
later log position. To ensure consistent behavior, this commit delays the
removal of synchronized_standby_slots until after max_retention_duration
is set to 0.

Author: Zhijie Hou <houzj(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/TY4PR01MB16907805DE4816E53C54708159414A@TY4PR01MB16907.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0f42206531b3646f5bcda2bd35bb53fb0488eb00

Modified Files
--------------
src/test/subscription/t/035_conflicts.pl | 32 ++++++++++----------------------
1 file changed, 10 insertions(+), 22 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2025-09-16 07:49:13 pgsql: pg_dump: Fix dumping of security labels on subscriptions and eve
Previous Message Peter Eisentraut 2025-09-16 05:44:17 pgsql: Fix incorrect const qualifier