| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Sergei Patiakin <sergei(dot)patiakin(at)enterprisedb(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, msawada(at)postgresql(dot)org |
| Subject: | Re: Session in aborted transaction misses effective_wal_level change |
| Date: | 2026-10-01 03:25:07 |
| Message-ID: | CAD21AoBmHPSrg96XZs87YxPgxFyuE6v1tBnS2TfQZqoXLwhX5g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Sep 30, 2026 at 10:19 AM Sergei Patiakin
<sergei(dot)patiakin(at)enterprisedb(dot)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 | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-deferred-XLogLogicalInfo-update-after-a-faile.patch | text/x-patch | 4.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-10-01 03:28:01 | Re: REPACK enhancements |
| Previous Message | shihao zhong | 2026-10-01 03:18:23 | Re: Report index currently being vacuumed in pg_stat_progress_vacuum |