Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit

From: Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>, Bryan Green <dbryan(dot)green(at)gmail(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit
Date: 2026-08-12 16:23:06
Message-ID: CAB8bMistgZAzF6GHTBP4T-5in5qL_-ihNwKr_1_gBC5NsbR=Kw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Andrey, Jonathan, Bryan!

v2 addresses the comments: savedParentNChildXids is initialized in
StartTransaction() alongside the other childXids fields (and still in
PushTransaction()).

The attached test uses a SUBXACT_EVENT_COMMIT_SUB callback so it does not
need --enable-injection-points and can be backported. The TAP case adapts
Andrey Borodin's demonstration to that callback.

ср, 12 авг. 2026 г. в 19:39, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>:

>
>
> > On 12 Aug 2026, at 16:36, Jonathan Gonzalez V. <
> jonathan(dot)abdiel(at)gmail(dot)com> wrote:
> >
> > Probably this requires to have this test in the patch, reproducing this
> > issue it's not easy. Using a test that use the callback or an injection
> > point, don't know if this it's expects to be backported, if that's not
> > the case probably an injection point plus a regression will be enough.
>
> It's relatively easy with injection point generating an error in the
> window. PFA.
> However it was not clear to me that error in this window is possible.
> I did not dig into Andrey Rachitskiy's analysis yet.
>
>
> Best regards, Andrey Borodin.
>
>

--
Regards,
Rachitskiy Andrey

Attachment Content-Type Size
v2-callback-0001-Fix-pg_xact-corruption-from-subtransaction-abort-after-subcommit.patch text/x-patch 18.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2026-08-12 16:36:53 Re: SQL-level pg_datum_image_equal
Previous Message Peter Geoghegan 2026-08-12 16:21:36 Re: RI fast path gets cross-type foreign keys wrong