pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgsql: Delay commit status checks until freezing executes.
Date: Tue, 3 Jan 2023 22:47:40 -0800
Message-ID: <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de> (raw)
In-Reply-To: <CAH2-WzmYObiABaysh1SSNBgm0OPYm07DNzRq2vA1DgsOtrodFQ@mail.gmail.com>
References: <E1pCmsu-001snM-Rr@gemulon.postgresql.org>
	<20230104005433.k5aptjbqx75fksfm@awork3.anarazel.de>
	<CAH2-WzkM_uM3gArOPSkE=tn9to1tPicc0qM7mJUV=_BDamKamQ@mail.gmail.com>
	<CAH2-Wz=jYBAiDz1_vakdBUPseiau-Pexc9YtJ5yS7F80p_pqnw@mail.gmail.com>
	<20230104035636.hy5djyr2as4gbc4q@awork3.anarazel.de>
	<CAH2-WzmRTo_8_v=wkK3f08iVzuwVUQ3G=Ff00sFCK-Q+dPF2kg@mail.gmail.com>
	<20230104063325.32xq2gpnwlelhogo@awork3.anarazel.de>
	<CAH2-WzmYObiABaysh1SSNBgm0OPYm07DNzRq2vA1DgsOtrodFQ@mail.gmail.com>

Hi,

On 2023-01-03 22:41:35 -0800, Peter Geoghegan wrote:
> On Tue, Jan 3, 2023 at 10:33 PM Andres Freund <andres@anarazel.de> wrote:
> > I'd say a comment above TransactionIdDidAbort() referencing an overview
> > comment at the top of the file? I think it might be worth moving the comment
> > from heapam_visibility.c to transam.c?
> 
> What comments in heapam_visibility.c should we be referencing here? I
> don't see anything about it there. I have long been aware that those
> routines deduce that a transaction must have aborted, but surely
> that's not nearly enough. That's merely not being broken, without any
> explanation given as to why.

IMO the comment at the top mentioning why the TransactionIdIsInProgress()
calls are crucial / need to be done first would be considerably more likely to
be found in transam.c than heapam_visibility.c. And it'd make sense to have
the explanation of why TransactionIdDidAbort() isn't the same as
!TransactionIdDidCommit(), even for !TransactionIdIsInProgress() xacts, near
the explanation for doing TransactionIdIsInProgress() first.

Greetings,

Andres Freund





view thread (24+ messages)  latest in thread

Message-ID: <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de>
Permalink:  ../20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de/
Also on:    postgresql.org/message-id/20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pg@bowt.ie, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Delay commit status checks until freezing executes.
  In-Reply-To: <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de>
  References: <E1pCmsu-001snM-Rr@gemulon.postgresql.org> <20230104005433.k5aptjbqx75fksfm@awork3.anarazel.de> <CAH2-WzkM_uM3gArOPSkE=tn9to1tPicc0qM7mJUV=_BDamKamQ@mail.gmail.com> <CAH2-Wz=jYBAiDz1_vakdBUPseiau-Pexc9YtJ5yS7F80p_pqnw@mail.gmail.com> <20230104035636.hy5djyr2as4gbc4q@awork3.anarazel.de> <CAH2-WzmRTo_8_v=wkK3f08iVzuwVUQ3G=Ff00sFCK-Q+dPF2kg@mail.gmail.com> <20230104063325.32xq2gpnwlelhogo@awork3.anarazel.de> <CAH2-WzmYObiABaysh1SSNBgm0OPYm07DNzRq2vA1DgsOtrodFQ@mail.gmail.com> <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox