Fix BF failure introduced by commit b3f6b14cf4.
authorAmit Kapila <[email protected]>
Fri, 1 Mar 2024 04:55:36 +0000 (10:25 +0530)
committerAmit Kapila <[email protected]>
Fri, 1 Mar 2024 04:55:36 +0000 (10:25 +0530)
The test added by commit b3f6b14cf4 uses a non-superuser and forgot to set
up pg_hba.conf to allow connections from it. The special setup is only
needed on Windows machines that don't use UNIX sockets.

As per buildfarm

Discussion: https://postgr.es/m/CAJpy0uCfrSspV1x3VWkgamqyhYaUWQZpP0nqjJx4YPvKqN6P_A@mail.gmail.com

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

index 825c26da6f236b673f4348fbc997900c949f387d..021c58f621cc839617660502a596ede2fd33215b 100644 (file)
@@ -14,7 +14,11 @@ use Test::More;
 
 # Create publisher
 my $publisher = PostgreSQL::Test::Cluster->new('publisher');
-$publisher->init(allows_streaming => 'logical');
+# Make sure pg_hba.conf is set up to allow connections from repl_role.
+# This is only needed on Windows machines that don't use UNIX sockets.
+$publisher->init(
+   allows_streaming => 'logical',
+   auth_extra => [ '--create-role', 'repl_role' ]);
 # Disable autovacuum to avoid generating xid during stats update as otherwise
 # the new XID could then be replicated to standby at some random point making
 # slots at primary lag behind standby during slot sync.