Re: Removing cruft in access/transam/xact.c

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Removing cruft in access/transam/xact.c
Date: 2004-03-28 22:16:59
Message-ID: 20040328221658.GA2543@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-03-29 00:17:17 Re: Removing cruft in access/transam/xact.c
Previous Message Alvaro Herrera 2004-03-28 16:42:31 Re: Removing cruft in access/transam/xact.c