Skip to content

Commit b47c50e

Browse files
author
Amit Kapila
committed
Fix intermittent BF failure in 040_standby_failover_slots_sync.
Commit 0d2d4a0 introduced a test that verifies replication slot synchronization to a standby server via SQL API. However, the test did not configure synchronized_standby_slots. Without this setting, logical failover slots can advance beyond the physical replication slot, causing intermittent synchronization failures. Author: Hou Zhijie <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/TY4PR01MB16907DF70205308BE918E0D4494ABA@TY4PR01MB16907.jpnprd01.prod.outlook.com
1 parent 5cf0355 commit b47c50e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/recovery/t/040_standby_failover_slots_sync.pl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,14 @@
10801080
);
10811081
is($result, 't', "check slot sync skip count increments");
10821082

1083+
# Configure primary to disallow any logical slots that have enabled failover
1084+
# from getting ahead of the specified physical replication slot (sb2_slot).
1085+
$primary->append_conf(
1086+
'postgresql.conf', qq(
1087+
synchronized_standby_slots = 'sb2_slot'
1088+
));
1089+
$primary->reload;
1090+
10831091
# Enable the Subscription, so that the remote slot catches up
10841092
$subscriber1->safe_psql('postgres', "ALTER SUBSCRIPTION regress_mysub1 ENABLE");
10851093
$subscriber1->wait_for_subscription_sync;

0 commit comments

Comments
 (0)