Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit - Mailing list pgsql-hackers

From Andrey Rachitskiy
Subject Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit
Date
Msg-id CAB8bMistgZAzF6GHTBP4T-5in5qL_-ihNwKr_1_gBC5NsbR=Kw@mail.gmail.com
Whole thread
In response to Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit
List 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@yandex-team.ru>:


> On 12 Aug 2026, at 16:36, Jonathan Gonzalez V. <jonathan.abdiel@gmail.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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: RI fast path gets cross-type foreign keys wrong
Next
From: Matthias van de Meent
Date:
Subject: Re: SQL-level pg_datum_image_equal