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

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 (view raw or flat)
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: add_starting.png
Description: image/png (8.7 KB) (inlined above)

Responses

pgsql-patches by date

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

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