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

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: 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-30 07:06:29
Message-ID: CAD21AoBZGuDVa-ctuko+Oma+X9qYppQbzWo8gNmJ1AiRyAjq7g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 29, 2026 at 3:21 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Jul 27, 2026 at 10:10 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > Agreed and pushed the 0001 patch.
> >
> > I've updated the comments in the previous-0002 patch, please review it.
> >
>
> In the comments you mentioned 'already-visible slot' as follows: "Our
> already-visible slot guarantees that this check doesn't miss ..." but
> we normally don't use visibility term for slots (it is used primarily
> for tuples). I think you mean to say that its in_use flag is set, I
> tried to slightly modify that part of the comment in the attached.
> See, if that looks okay to you.

Fair point. I've updated the comments and commit message not to use
the visibility term.

> Apart from that, I ran the added test on my Windows machine and it
> failed, attached find the required log.

Thank you for testing it. It seems to be reproducible also on CI, and
I believe I've fixed the issue.

I've attached the patch. Please review it.

Regards,

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

Attachment Content-Type Size
v5-0001-Fix-races-between-deactivation-of-logical-decodin.patch text/x-patch 18.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2026-07-30 07:11:11 Re: Direct Toast PoC
Previous Message Jakub Wartak 2026-07-30 06:59:56 Re: COPY TO BLACKHOLE / pg_dump -j -Fb