Removing cruft in access/transam/xact.c

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Removing cruft in access/transam/xact.c
Date: 2004-03-27 03:45:32
Message-ID: 20040327034531.GA24128@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Patchers,

This patch removes the unnecesary TRANS_* states that supposedly
represented "low level transaction state". The state is actually
unnecesary because the states can be accurately represented using the
TBLOCK_* states. This simplifies the code somewhat.

It also allows the state machinery to be actually represented as a
directed graph. If you look closely you'll see that the first graph I
posted yesterday was missing the StartTransactionCommand stuff; it
wasn't representable in an obvious ways. This patch corrects that, by
adding a new TBLOCK_STARTED state.

I also attach the graph that represents this machinery. Don't add this
to the source; it will probably be better to add the .dot source file.

I also removed some #ifdef NOT_USED code, and the IsTransactionState()
function, which can be replaced by IsTransactionOrTransactionBlock().
Maybe the latter can be renamed ...

This passes the full regression test suite. Please review and apply if
OK.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)

Attachment Content-Type Size
image/png 8.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Claudio Natoli 2004-03-27 05:01:21 Re: APC/socket fix (final?)
Previous Message Tom Lane 2004-03-27 03:12:45 Re: compiling with ssl without thread safety still broken