pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: alvherre@kurilemu.de <alvherre@kurilemu.de>
To: Bingshuai Li <lucian1412@outlook.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: mark.dilger@enterprisedb.com <mark.dilger@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Cc: a.kozhemyakin@postgrespro.ru <a.kozhemyakin@postgrespro.ru>
Subject: Re: Bug in logical decoding with DDL and subtransactions
Date: Thu, 17 Sep 2026 13:16:04 +0200
Message-ID: <aqvJDO3fYcomY4Cr@alvherre.pgsql> (raw)
In-Reply-To: <ME0P300MB0953FB8C1B9731C5C28EEC3EC6B82@ME0P300MB0953.AUSP300.PROD.OUTLOOK.COM>

On 2026-Sep-17, Bingshuai Li wrote:

> With the buildfarm now red on HEAD and PostgreSQL 19 GA
> approaching, could a committer please take a look at v4?  The two
> points where I would most appreciate judgement are unchanged from
> my August 27 mail: the restart_lsn invariant (section 2 of the v4
> mail), and whether the O(N) abort-time cleanup is acceptable to
> backpatch.  I also believe this strengthens the case for tracking
> BUG #19555 as a PostgreSQL 19 open item.

What's the reason to consider this as a worse problem in 19 than in
previous releases?  In my mind it's pretty clear that this bug needs to
be fixed in all stable branches.  Moreover, I think the real deadline
here is the next set of minors to be released in November, rather than
the 19.0 release.  The November minors would also include 19.1.

> I'm happy to prepare a REL_19_STABLE version of the patch if that
> would help.

If the proposed patch has any conflicts when applied on any previous
branches, then by all means please do provide backpatches as
appropriate.  However, if the same patch applies cleanly or only has
trivial conflicts, then there's no need.  (I see there's a trivial
conflict in 18's test schedule files for instance, for which IMO you
don't need to provide a patch.  Didn't try further back.)

The patch does change the layout of ReorderBufferChange, which is
apparently an exported struct, so some analysis on whether that can
break anything would also be useful.  It might be innocuous, if there
are no external users, but better make sure ...

inline patch 1: /tmp/ReorderBufferChange.patched (+9/-7 lines) download inline-1.patch--- /tmp/ReorderBufferChange.unpatched 2026-09-17 13:09:09.517276936 +0200 +++ /tmp/ReorderBufferChange.patched 2026-09-17 13:09:35.505580268 +0200 @@ -37,27 +37,29 @@ CommandId command_id; /* 32 4 */ struct { RelFileLocator locator; /* 32 12 */ ItemPointerData tid __attribute__((__aligned__(2))); /* 44 6 */ /* XXX 2 bytes hole, try to pack */ CommandId cmin; /* 52 4 */ CommandId cmax; /* 56 4 */ CommandId combocid; /* 60 4 */ - } __attribute__((__aligned__(4))) tuplecid __attribute__((__aligned__(4))); /* 32 32 */ + /* --- cacheline 1 boundary (64 bytes) --- */ + TransactionId subxid; /* 64 4 */ + } __attribute__((__aligned__(4))) tuplecid __attribute__((__aligned__(4))); /* 32 36 */ struct { uint32 ninvalidations; /* 32 4 */ /* XXX 4 bytes hole, try to pack */ SharedInvalidationMessage * invalidations; /* 40 8 */ } inval; /* 32 16 */ - } data __attribute__((__aligned__(8))); /* 32 32 */ - /* --- cacheline 1 boundary (64 bytes) --- */ - dlist_node node; /* 64 16 */ + } data __attribute__((__aligned__(8))); /* 32 40 */ + /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */ + dlist_node node; /* 72 16 */ - /* size: 80, cachelines: 2, members: 6 */ - /* sum members: 70, holes: 2, sum holes: 10 */ + /* size: 88, cachelines: 2, members: 6 */ + /* sum members: 78, holes: 2, sum holes: 10 */ /* forced alignments: 1, forced holes: 1, sum forced holes: 6 */ - /* last cacheline: 16 bytes */ + /* last cacheline: 24 bytes */ } __attribute__((__aligned__(8)));
-- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Debido a que la velocidad de la luz es mucho mayor que la del sonido, algunas personas nos parecen brillantes un minuto antes de escuchar las pelotudeces que dicen." (Roberto Fontanarrosa)

view thread (53+ messages)  latest in thread

Message-ID: <aqvJDO3fYcomY4Cr@alvherre.pgsql>
Permalink:  ../aqvJDO3fYcomY4Cr@alvherre.pgsql/
Also on:    postgresql.org/message-id/aqvJDO3fYcomY4Cr@alvherre.pgsql

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@kurilemu.de, lucian1412@outlook.com, mark.dilger@enterprisedb.com, amit.kapila16@gmail.com, sawada.mshk@gmail.com, exclusion@gmail.com, pl0h0yp1@gmail.com, a.kozhemyakin@postgrespro.ru
  Subject: Re: Bug in logical decoding with DDL and subtransactions
  In-Reply-To: <aqvJDO3fYcomY4Cr@alvherre.pgsql>
  References: <ME0P300MB0953FB8C1B9731C5C28EEC3EC6B82@ME0P300MB0953.AUSP300.PROD.OUTLOOK.COM> <aqvJDO3fYcomY4Cr@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox