Skip site navigation (1) Skip section navigation (2)

IsTransactionState() is being used incorrectly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: IsTransactionState() is being used incorrectly
Date: 2007-06-03 18:53:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
I just noticed that there are a number of places (mostly GUC assignment
hooks) that use IsTransactionState() to decide if it's safe for them to
do catalog lookups.  This seems pretty bogus because IsTransactionState
will return true in an aborted transaction.  I'm not sure there's any
actual bug because of other constraints on when GUC updates occur, but
it sure looks like trouble waiting to happen.

We could fix this either by changing the definition of
IsTransactionState() or by introducing another test function with
a different name.  Any thoughts which is preferable?

			regards, tom lane


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2007-06-03 21:42:14
Subject: Re: What is happening on buildfarm member baiji?
Previous:From: Tom LaneDate: 2007-06-03 17:08:40
Subject: pgsql: Create a GUC parameter temp_tablespaces that allows selection of

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group