On Sat, Jan 22, 2022 at 6:00 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > On Sat, Jan 22, 2022 at 8:48 AM Andres Freund <and...@anarazel.de> wrote: > > Unfortunately we don't quite seem there yet: > > And another way to fail: > > pg_dump: error: query failed: ERROR: canceling statement due to > conflict with recovery > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dangomushi&dt=2022-01-22%2003%3A06%3A42 > > Probably needs hot_standby_feedback on. Will adjust this soon.
Seen again today on prairiedog. Erm, scratch that idea, HS feedback interferes with test results. I guess max_standby_streaming_delay should be increased to 'forever', like in the attached, since pg_dump runs for a very long time on prairiedog: 2022-02-01 04:47:59.294 EST [3670:15] 027_stream_regress.pl LOG: statement: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY ... 2022-02-01 04:49:09.881 EST [3683:2585] 027_stream_regress.pl ERROR: canceling statement due to conflict with recovery
From 472062f1c38449e700db87db4dbd31b88190bad2 Mon Sep 17 00:00:00 2001 From: Thomas Munro <thomas.mu...@gmail.com> Date: Wed, 2 Feb 2022 13:40:15 +1300 Subject: [PATCH] Fix recovery conflict in 027_stream_regress.pl. To avoid "ERROR: canceling statement due to conflict with recovery" seen on a couple of slower build farm animals, adjust max_standby_streaming_delay to wait as long as necessary to avoid conflicts. In passing, adjust a configuration option that accidentally used a non-standard format (not a problem, but needlessly inconsistent). Discussion: https://postgr.es/m/CA%2BhUKGK65xVqNgsSPyrr2LEwtfUN%3DGfEuQ868hTC-mu0bFG42A%40mail.gmail.com --- src/test/recovery/t/027_stream_regress.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl index 782f24b429..ec214daaab 100644 --- a/src/test/recovery/t/027_stream_regress.pl +++ b/src/test/recovery/t/027_stream_regress.pl @@ -20,7 +20,7 @@ else # Initialize primary node my $node_primary = PostgreSQL::Test::Cluster->new('primary'); $node_primary->init(allows_streaming => 1); -$node_primary->adjust_conf('postgresql.conf', 'max_connections', '25', 1); +$node_primary->adjust_conf('postgresql.conf', 'max_connections', '25'); $node_primary->append_conf('postgresql.conf', 'max_prepared_transactions = 10'); # WAL consistency checking is resource intensive so require opt-in with the @@ -48,6 +48,8 @@ $node_standby_1->init_from_backup($node_primary, $backup_name, has_streaming => 1); $node_standby_1->append_conf('postgresql.conf', "primary_slot_name = standby_1"); +$node_standby_1->append_conf('postgresql.conf', + 'max_standby_streaming_delay = -1'); $node_standby_1->start; my $dlpath = PostgreSQL::Test::Utils::perl2host(dirname($ENV{REGRESS_SHLIB})); -- 2.33.1