Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation
Date: 2026-07-31 03:49:34
Message-ID: CAD21AoDzRTcX-Bb01=24nLoEO5Mkb-ChTzcQ1E01t2W_=Bj25Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 30, 2026 at 5:52 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> writes:
> > I've reproduced the issue on local and confirmed the root cause; two
> > background psql sessions in the TAP test run with ON_ERROR_STOP=1 and
> > got canceled by pg_cancel_backend(), so psql exited as soon as the
> > cancelation error arrived. I've attached the patch that fixes the
> > problem. I'm waiting for CI to check if the tests still pass on other
> > environments.
>
> The buildfarm looks like this has made 051_effective_wal_level.pl
> less stable, not more so. The failures all look like
>
> [18:37:44.952](0.014s) # injection_point 'logical-decoding-activation' is reached
> [18:37:44.982](0.030s) ok 35 - the activation process aborted
> [18:37:44.982](0.001s) # die: ack Broken pipe: write( 13, '\\q
> # ' ) at /usr/share/perl5/vendor_perl/IPC/Run/IO.pm line 550.
> [18:37:44.982](0.000s) 1..35
> ack Broken pipe: write( 13, '\\q
> ' ) at /usr/share/perl5/vendor_perl/IPC/Run/IO.pm line 550.
> # Postmaster PID for node "primary" is 81208
> ### Stopping node "primary" using mode immediate

What does the buildfarm member produce the above logs? Many buildfarm
members failed with that error due to commit 6a80179f6b0, but I've not
seen further failures since pushing commit 18f9785e0b3.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2026-07-31 03:54:33 Re: Increase repalloc_array() usage in buffile.c
Previous Message Michael Paquier 2026-07-31 03:48:06 Re: Fix optind handling inconsistency in getopt_long() for missing argument