postgres.git / summary / log / commit / refs

commit    b47c50e5667b489bec3affb55ecdf4e9c306ca2d
Author:   Amit Kapila <akapila@postgresql.org>
Date:     Thu Dec 18 05:06:55 2025 +0000

    Fix intermittent BF failure in 040_standby_failover_slots_sync.
    
    Commit 0d2d4a0ec3 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


src/test/recovery/t/040_standby_failover_slots_sync.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/recovery/t/040_standby_failover_slots_sync.pl b/src/test/recovery/t/040_standby_failover_slots_sync.pl index 20f942cfd14..7dadd8647e5 100644 --- a/src/test/recovery/t/040_standby_failover_slots_sync.pl +++ b/src/test/recovery/t/040_standby_failover_slots_sync.pl @@ -1080,6 +1080,14 @@ $result = $standby2->safe_psql('postgres', ); is($result, 't', "check slot sync skip count increments"); +# Configure primary to disallow any logical slots that have enabled failover +# from getting ahead of the specified physical replication slot (sb2_slot). +$primary->append_conf( + 'postgresql.conf', qq( +synchronized_standby_slots = 'sb2_slot' +)); +$primary->reload; + # Enable the Subscription, so that the remote slot catches up $subscriber1->safe_psql('postgres', "ALTER SUBSCRIPTION regress_mysub1 ENABLE"); $subscriber1->wait_for_subscription_sync; [parent: 5cf03552fbb4]