Re: Session in aborted transaction misses effective_wal_level change - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Session in aborted transaction misses effective_wal_level change
Date
Msg-id CAD21AoBmHPSrg96XZs87YxPgxFyuE6v1tBnS2TfQZqoXLwhX5g@mail.gmail.com
Whole thread
In response to Session in aborted transaction misses effective_wal_level change  (Sergei Patiakin <sergei.patiakin@enterprisedb.com>)
List pgsql-hackers
Hi,

On Wed, Sep 30, 2026 at 10:19 AM Sergei Patiakin
<sergei.patiakin@enterprisedb.com> wrote:
>
> For an aborted transaction, there is today a gap between the
> AtEOXact_LogicalCtl call and the XID being cleared. If an
> effective_wal_level change occurs during that gap, the change will be
> missed. That means the next transaction on that session will not be
> logically decoded.
>
> Attaching a reproducer bash script that demonstrates the missing decoded change.
> Attaching a fix that moves the AtEOXact_LogicalCtl call later, closing the gap.

Thank you for the report. I agree it's an issue that we should fix for v19.

The fix looks good to me. We need to check and update XLogLogicalInfo
in every place where we reset the top-level transaction id.

I've updated the patch with the regression tests. Please review it.

Regards,

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

Attachment

pgsql-hackers by date:

Previous
From: shihao zhong
Date:
Subject: Re: Report index currently being vacuumed in pg_stat_progress_vacuum
Next
From: shihao zhong
Date:
Subject: Re: REPACK enhancements