Re: Bug in logical decoding with DDL and subtransactions

From: Bingshuai Li <lucian1412(at)outlook(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "mark(dot)dilger(at)enterprisedb(dot)com" <mark(dot)dilger(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "alvherre(at)kurilemu(dot)de" <alvherre(at)kurilemu(dot)de>
Subject: Re: Bug in logical decoding with DDL and subtransactions
Date: 2026-08-27 07:38:22
Message-ID: ME0P300MB0568CA479E6881027DD8AF6FC6AD2@ME0P300MB0568.AUSP300.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

A brief ping on v4 before PG20-2 starts. The latest CFBot run is
green on all enabled jobs:

https://github.com/postgres/postgres-cfbot/actions/runs/32910623105/attempts/1

The point on which I would especially appreciate review is the
restart_lsn invariant described in section 2 of v4: a decoding pass
that does not know the subtransaction's parent cannot output-decode
that transaction's commit, so tuplecid entries left by the skipped
cleanup cannot reach ReorderBufferBuildTupleCidHash().

Could someone comment on whether that reasoning is sound, and whether
the O(N) abort-time cleanup is an acceptable backpatchable fix?

PostgreSQL 19 is currently at Beta 3. Should BUG #19555 also be
tracked as a PostgreSQL 19 open item?

CF entry:
https://commitfest.postgresql.org/patch/7137/

Thanks,
Bingshuai Li

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-08-27 08:01:35 Re: pg_upgrade silently truncates nextMultiOffset to 32 bits
Previous Message Richard Guo 2026-08-27 07:36:32 Re: [PATCH] Fix disabled_nodes propagation for single-child Append paths