Re: Removing cruft in access/transam/xact.c - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Removing cruft in access/transam/xact.c
Date
Msg-id 20040328221658.GA2543@dcc.uchile.cl
Whole thread Raw
In response to Re: Removing cruft in access/transam/xact.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Removing cruft in access/transam/xact.c
List pgsql-patches
On Sat, Mar 27, 2004 at 12:21:07AM -0500, Tom Lane wrote:

[...]

> The similar changes that remove the ability to recognize failures
> during AbortTransaction are even worse, because cleanup after a failed
> transaction is exactly where you would most expect software bugs to
> pop up.

Hey, I was just adding the code back when I noticed that
AbortTransaction() sets the TRANS_ABORT state just _before_ doing it's
work, not after.  And all functions are executed with interrupts held
(HOLD_INTERRUPTS / RELEASE_INTERRUPTS).  So the comments I made earlier
are irrelevant.

After all this, I still think the TRANS state is unnecesary.  I will add
checks in the low level routines so they see what TBLOCK state they are
called in, which should be enough to keep the current functionality
and robustness.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"A wizard is never late, Frodo Baggins, nor is he early.
He arrives precisely when he means to."  (Gandalf, en LoTR FoTR)

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Removing cruft in access/transam/xact.c
Next
From: Alvaro Herrera
Date:
Subject: Re: Removing cruft in access/transam/xact.c