From d80da7f3433ef66ca80006ee35bd3f47ea1cc3fc Mon Sep 17 00:00:00 2001 From: Hayato Kuroda Date: Tue, 9 Jan 2024 05:16:15 +0000 Subject: [PATCH] Add GUC settings to avoid random failures on Windows --- src/bin/pg_upgrade/t/003_logical_slots.pl | 4 ++++ src/bin/pg_upgrade/t/004_subscription.pl | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_upgrade/t/003_logical_slots.pl b/src/bin/pg_upgrade/t/003_logical_slots.pl index 0e7014ecce..b880fed804 100644 --- a/src/bin/pg_upgrade/t/003_logical_slots.pl +++ b/src/bin/pg_upgrade/t/003_logical_slots.pl @@ -22,6 +22,10 @@ $oldpub->append_conf('postgresql.conf', 'autovacuum = off'); # Initialize new cluster my $newpub = PostgreSQL::Test::Cluster->new('newpub'); $newpub->init(allows_streaming => 'logical'); +$newpub->append_conf('postgresql.conf', q{ +bgwriter_lru_maxpages = 0 +checkpoint_timeout = 1h +}); # Setup a common pg_upgrade command to be used by all the test cases my @pg_upgrade_cmd = ( diff --git a/src/bin/pg_upgrade/t/004_subscription.pl b/src/bin/pg_upgrade/t/004_subscription.pl index 9e8f9b7970..0c2342d430 100644 --- a/src/bin/pg_upgrade/t/004_subscription.pl +++ b/src/bin/pg_upgrade/t/004_subscription.pl @@ -27,6 +27,11 @@ my $oldbindir = $old_sub->config_data('--bindir'); # Initialize the new subscriber my $new_sub = PostgreSQL::Test::Cluster->new('new_sub'); $new_sub->init; +$new_sub->append_conf('postgresql.conf', q{ +bgwriter_lru_maxpages = 0 +checkpoint_timeout = 1h +}); + my $newbindir = $new_sub->config_data('--bindir'); # In a VPATH build, we'll be started in the source directory, but we want @@ -200,7 +205,12 @@ $old_sub->stop; # ------------------------------------------------------ my $new_sub1 = PostgreSQL::Test::Cluster->new('new_sub1'); $new_sub1->init; -$new_sub1->append_conf('postgresql.conf', "max_replication_slots = 0"); +$new_sub1->append_conf('postgresql.conf', q{ +bgwriter_lru_maxpages = 0 +checkpoint_timeout = 1h +max_replication_slots = 0 +}); + # pg_upgrade will fail because the new cluster has insufficient # max_replication_slots. -- 2.43.0