Re: TransactionIdIsActive() has long been unused

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2025-07-12T15:20:21Z
Lists: pgsql-hackers
Hi,

On 2025-07-10 09:52:45 +0900, Michael Paquier wrote:
> On Wed, Jul 09, 2025 at 03:46:43PM -0400, Tom Lane wrote:
> > Andres Freund <andres@anarazel.de> writes:
> >> Seems like we should just remove TransactionIdIsActive()?
> > 
> > +1.  I wondered if any extensions might depend on it, but
> > could not find any trace of that in Debian code search.
> > And it's a sufficiently odd test (as noted in its comments)
> > that one could debate whether using it for an extension's
> > purposes would be correct anyway.
> 
> +1.

Great. Thanks for checking Tom, Michael.  Pushed.

Greetings,

Andres Freund



Commits

  1. Remove long-unused TransactionIdIsActive()

  2. Fix race condition in preparing a transaction for two-phase commit.