]> granicus.if.org Git - postgresql/commit
Make some simple performance improvements in TransactionIdIsInProgress().
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Sep 2007 17:36:53 +0000 (17:36 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Sep 2007 17:36:53 +0000 (17:36 +0000)
commitda072ab2ab538bf1811abe5a1df131c0c9a8e6e4
tree664ebca17e65551f70cc0dce22fedc2aa9094849
parentbd0af827da5f5c648cb7530bb7157a24d8bd7a07
Make some simple performance improvements in TransactionIdIsInProgress().
For XIDs of our own transaction and subtransactions, it's cheaper to ask
TransactionIdIsCurrentTransactionId() than to look in shared memory.
Also, the xids[] work array is always the same size within any given
process, so malloc it just once instead of doing a palloc/pfree on every
call; aside from being faster this lets us get rid of some goto's, since
we no longer have any end-of-function pfree to do.  Both ideas by Heikki.
src/backend/storage/ipc/procarray.c