On Wed, May 27, 2026 at 11:56 AM Masahiko Sawada <[email protected]> wrote: > > On Wed, May 27, 2026 at 11:25 AM Masahiko Sawada <[email protected]> > wrote: > > > > On Wed, May 27, 2026 at 11:20 AM Álvaro Herrera <[email protected]> > > wrote: > > > > > > On 2026-May-26, shveta malik wrote: > > > > > > > On Tue, May 26, 2026 at 3:09 PM Imran Zaheer <[email protected]> > > > > wrote: > > > > > > > > > > Hi, > > > > > > > > > > Thanks Shveta, I agree with the additional sanity checks and > > > > > comments. > > > > > > > > Thanks, v3 LGTM. > > > > > > Thanks! Pushed with some cosmetic changes. > > > > Thank you for pushing the patch! > > Some buildfarm members reported failures[1][2]. The newly added test > works only on builds without injection points because the logical slot > "test_slot" is removed during tests using injection points, otherwise > it still exists on the primary server at the end of > 051_effective_wal_level.pl. >
I've attached the patch to fix the issue by moving the new test earlier in the test script, so it no longer depends on slot state. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
From 612b192cfe83cf109ec876594b45abe9fbcea20e Mon Sep 17 00:00:00 2001 From: Masahiko Sawada <[email protected]> Date: Wed, 27 May 2026 12:17:28 -0700 Subject: [PATCH v1] Fix 051_effective_wal_level.pl on builds without injection points. Commit 2af1dc89282 placed the new "logical decoding disabled after REPACK (CONCURRENTLY)" check at the end of 051_effective_wal_level.pl. That placement assumed the logical slot "test_slot" no longer existed when the check ran, but the assumption only holds on builds with injection points: the earlier injection-point-driven tests drop "test_slot" as a side effect, while on builds without injection points the slot persists. When "test_slot" still exists, logical decoding remains enabled and the new check fails on those buildfarm members. Move the REPACK test earlier in the script, before "test_slot" is created, so it no longer depends on slot state torn down by later tests. Discussion: https://postgr.es/m/cad21aobmdmbq-+jga+jskkq5opgep1pejsjfrpt6mcwvhld...@mail.gmail.com --- .../recovery/t/051_effective_wal_level.pl | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/recovery/t/051_effective_wal_level.pl b/src/test/recovery/t/051_effective_wal_level.pl index 9341e11d58a..c862073c34e 100644 --- a/src/test/recovery/t/051_effective_wal_level.pl +++ b/src/test/recovery/t/051_effective_wal_level.pl @@ -65,6 +65,20 @@ ok( $primary->log_contains( # Wait for the checkpointer to disable logical decoding. wait_for_logical_decoding_disabled($primary); +# Test that logical decoding is disabled after repack +$primary->safe_psql('postgres', qq[create table foo(a int primary key)]); +$primary->safe_psql('postgres', qq[repack (concurrently) foo;]); +ok( $primary->log_contains( + "logical decoding is enabled upon creating a new logical replication slot" + ), + "logical decoding enabled by repack"); + +# Wait for the checkpointer to disable logical decoding. +wait_for_logical_decoding_disabled($primary); +test_wal_level($primary, "replica|replica", + "logical decoding disabled after repack" +); + # Create a new logical slot and check that effective_wal_level must be increased # to 'logical'. $primary->safe_psql('postgres', @@ -400,20 +414,6 @@ select pg_cancel_backend(pid) from pg_stat_activity where query ~ 'slot_canceled "the activation process aborted"); } -# Test that logical decoding is disabled after repack -$primary->safe_psql('postgres', qq[create table foo(a int primary key)]); -$primary->safe_psql('postgres', qq[repack (concurrently) foo;]); -ok( $primary->log_contains( - "logical decoding is enabled upon creating a new logical replication slot" - ), - "logical decoding enabled by repack"); - -# Wait for the checkpointer to disable logical decoding. -wait_for_logical_decoding_disabled($primary); -test_wal_level($primary, "replica|replica", - "logical decoding disabled after repack" -); - $primary->stop; done_testing(); -- 2.54.0
