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

pgsql: Make some simple performance improvements in

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make some simple performance improvements in
Date: 2007-09-21 17:36:53
Message-ID: (view raw or whole thread)
Lists: pgsql-committers
Log Message:
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.

Modified Files:
        procarray.c (r1.33 -> r1.34)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-09-21 18:24:28
Subject: pgsql: Change tqual.c tests to use !TransactionIdIsCurrentTransactionId,
Previous:From: Tom LaneDate: 2007-09-21 16:32:19
Subject: pgsql: Fix comments that misspelled TransactionIdIsInProgress, per

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