Re: deferred writing of two-phase state files adds fragility - Mailing list pgsql-hackers

From Tom Lane
Subject Re: deferred writing of two-phase state files adds fragility
Date
Msg-id 2372479.1733335123@sss.pgh.pa.us
Whole thread Raw
In response to Re: deferred writing of two-phase state files adds fragility  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: deferred writing of two-phase state files adds fragility
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Dec 4, 2024 at 12:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Could we fix it so ROLLBACK TRANSACTION removes the GID from the
>> list of prepared xacts that need to be written out?  Then we'd
>> no longer have a pending requirement to read the broken WAL record.

> That would be nice, but I'm not sure that it's possible. As currently
> implemented, FinishPreparedTransaction() always reads the two-phase
> state data either from the two-phase file or the WAL, whether it's
> committing or rolling back.

I'm not following.  FinishPreparedTransaction is not what's preventing
checkpoints or holding back the VACUUM horizon.  What is doing that
is the in-memory fake PGPROC representing the prepared transaction
(I forget the exact terminology).  I'm suggesting that we could have
some way to nuke one of those without properly cleaning up the
prepared xact.  Maybe it'd need to be invoked via a different command
than ROLLBACK TRANSACTION.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: deferred writing of two-phase state files adds fragility
Next
From: Robert Haas
Date:
Subject: Re: deferred writing of two-phase state files adds fragility