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

From Andrey Borodin
Subject Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit
Date
Msg-id 3336B68C-8B17-4C25-BE3A-36A06D492724@yandex-team.ru
Whole thread
In response to Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit  (Andrey Rachitskiy <pl0h0yp1@gmail.com>)
Responses Re: Support EXCEPT for ALL SEQUENCES publications
List pgsql-hackers

> On 12 Aug 2026, at 19:23, Andrey Rachitskiy <pl0h0yp1@gmail.com> wrote:
> 
> The TAP case adapts
> Andrey Borodin's demonstration to that callback.

The injection-point test was not intended as a committable test.  I
wanted to make the resulting corruption directly observable.  On its
own it was not entirely convincing, because it injected an ERROR
without showing that stock code could raise one there.

As I understand your OOM analysis, AtSubCommit_Notify() provides a real,
if probably rare, path to a catchable ERROR after
AtSubCommit_childXids().  A one-off allocation failure does not
necessarily imply that the subsequent abort and parent commit must also
fail.

Taken together, your analysis establishes that the window is reachable,
while the injection-point test demonstrates the corruption resulting
from an ERROR in that window.  So yes, this appears to be a real
corruption scenario.

Thank you!


Best regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Introduce psystem() to replace system()
Next
From: Álvaro Herrera
Date:
Subject: Re: [PATCH] REPLICA IDENTITY USING INDEX accepts column with invalid NOT NULL