Re: pgsql: Delay commit status checks until freezing executes. - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: pgsql: Delay commit status checks until freezing executes.
Date
Msg-id CAH2-Wz=qKSEor8EHOzxhTDtxUacot0U=1hmnT=Rp8Q=OM4ggMw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Delay commit status checks until freezing executes.  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Delay commit status checks until freezing executes.
Re: pgsql: Delay commit status checks until freezing executes.
List pgsql-hackers
On Tue, Jan 3, 2023 at 10:47 PM Andres Freund <andres@anarazel.de> wrote:
> 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.

Yeah, but they're duplicated anyway. For example in the transam
README. Plus we have references to these same comments from other
files, such as heapam.c, which mentions heapam_visibility.c by name as
where you go to learn more about this issue.

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

I think that we should definitely have a comment directly over
TransactionIdDidAbort(). Though I wouldn't mind reorganizing these
other comments, or making the comment over TransactionIdDidAbort()
mostly just point to the other comments.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Delay commit status checks until freezing executes.
Next
From: "shiy.fnst@fujitsu.com"
Date:
Subject: Ignore dropped columns when checking the column list in logical replication