From 3ce8ff704de4468bba564aa3b3185b0bfdc12670 Mon Sep 17 00:00:00 2001 From: Mark Dilger Date: Mon, 27 Sep 2021 11:19:41 -0700 Subject: [PATCH v1 1/3] Harden test againt premature discarding of WAL Not using a physical replication slot between the primary and standby makes the test brittle should default GUC settings someday be reduced, or WAL volume someday be increased, or some combination of those two. We happen to get lucky now that the WAL generated by the test won't be discarded before it is used. Harden the test. --- src/test/recovery/t/015_promotion_pages.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/recovery/t/015_promotion_pages.pl b/src/test/recovery/t/015_promotion_pages.pl index 562c4cd3e4..b73622c7df 100644 --- a/src/test/recovery/t/015_promotion_pages.pl +++ b/src/test/recovery/t/015_promotion_pages.pl @@ -22,6 +22,8 @@ EOF # Start the primary $alpha->start; +$alpha->safe_psql('postgres', + "SELECT pg_create_physical_replication_slot('bravo')"); # setup/start a standby $alpha->backup('bkp'); @@ -29,6 +31,7 @@ my $bravo = PostgresNode->new('bravo'); $bravo->init_from_backup($alpha, 'bkp', has_streaming => 1); $bravo->append_conf('postgresql.conf', <start; -- 2.21.1 (Apple Git-122.3)