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.
> 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.