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

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-10-30 21:56:14
Message-ID: CAD21AoA9Bvc_LwJLqxODphPg5SP6YbGFvTCX02fQoOQ5Ma82kQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Oct 30, 2026 at 5:37 AM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Hi,
>
> > `check-world` with this sleep reveals also other tests suffering from the
> > same disease:
> > src/test/modules/test_misc/t/010_index_concurrently_upsert.pl
> > repack_toast
> > repack_missingval
> > repack_temporal
> > repack_temporal_multirange
>
> I analyzed other issues and attaches patch set. 0001 fixes the

I've reviewed only the 0001 patch. While I agree with your analysis, I
think it's sufficient to call injection_points_detach() before quit,
no? Also, the following codes in 051_effective_wal_level.pl seems to
have the same issue;

# Resume the slot synchronization; it must skip persisting the slot.
$log_offset = -s $standby5->logfile;
$standby5->safe_psql('postgres',
qq[select injection_points_wakeup('replication-slot-create-begin')]);
$standby5->wait_for_log(
qr/could not synchronize replication slot "sync_slot"/, $log_offset);
$psql_sync_slot->quit;

A new background psql session begins later and attaches the same
injection point. I think we should add injectoin_points_detach()
before _wakeup().

Regards,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-10-30 21:57:05 Re: Add REPACK progress phases for logical decoding setup
Previous Message Andrew Dunstan 2026-10-30 21:43:27 Re: [PG19] Three bugs with a CHECK constraint that only the child enforces