diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-21 17:36:53 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-21 17:36:53 +0000 |
commit | da072ab2ab538bf1811abe5a1df131c0c9a8e6e4 (patch) | |
tree | 664ebca17e65551f70cc0dce22fedc2aa9094849 /src/backend/utils/adt/regexp.c | |
parent | bd0af827da5f5c648cb7530bb7157a24d8bd7a07 (diff) | |
download | postgresql-da072ab2ab538bf1811abe5a1df131c0c9a8e6e4.tar.gz postgresql-da072ab2ab538bf1811abe5a1df131c0c9a8e6e4.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/regexp.c')
0 files changed, 0 insertions, 0 deletions