Re: pgsql: Delay commit status checks until freezing executes.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgsql: Delay commit status checks until freezing executes.
Date: 2023-01-11 23:06:56
Message-ID: 20230111230656.q4ur4a2ww7plmaau@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

On 2023-01-11 14:29:25 -0800, Peter Geoghegan wrote:
> On Sat, Jan 7, 2023 at 7:25 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > Probably a good idea, although it doesn't neatly fit right now.
>
> I'll leave it for now.
>
> Attached is v2, which changes things based on your feedback. Would
> like to get this out of the way soon.

Makes sense. It's clearly an improvement.

> + * We can't use TransactionIdDidAbort here because it won't treat transactions
> + * that were in progress during a crash as aborted by now. We determine that
> + * transactions aborted/crashed through process of elimination instead.

s/by now//?

> * When using an MVCC snapshot, we rely on XidInMVCCSnapshot rather than
> * TransactionIdIsInProgress, but the logic is otherwise the same: do not
> diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
> index 3a28dcc43..7629904bb 100644
> --- a/src/backend/access/transam/transam.c
> +++ b/src/backend/access/transam/transam.c
> @@ -110,7 +110,8 @@ TransactionLogFetch(TransactionId transactionId)
> * transaction tree.
> *
> * See also TransactionIdIsInProgress, which once was in this module
> - * but now lives in procarray.c.
> + * but now lives in procarray.c, as well as comments at the top of
> + * heapam_visibility.c that explain how everything fits together.
> * ----------------------------------------------------------------
> */

+1

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2023-01-11 23:32:16 pgsql: Improve TransactionIdDidAbort() documentation.
Previous Message Tom Lane 2023-01-11 23:05:32 Re: pgsql: Doc: add XML ID attributes to <sectN> and <varlistentry> tags.

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-01-11 23:09:51 Re: How to generate the new expected out file.
Previous Message Tom Lane 2023-01-11 23:05:32 Re: pgsql: Doc: add XML ID attributes to <sectN> and <varlistentry> tags.