Fix TransactionIdIsCurrentTransactionId() to use binary search instead of
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Mar 2008 02:18:55 +0000 (02:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Mar 2008 02:18:55 +0000 (02:18 +0000)
commitd6f419a5c995c16be8ee763e2f6ea8d23ff535b1
tree7c861791dad9c50e4cb193da36f841b7dc5e0497
parent5f5940963bb048a9b24d1b0d52b4179a3c18bab9
Fix TransactionIdIsCurrentTransactionId() to use binary search instead of
linear search when checking child-transaction XIDs.  This makes for an
important speedup in transactions that have large numbers of children,
as in a recent example from Craig Ringer.  We can also get rid of an
ugly kluge that represented lists of TransactionIds as lists of OIDs.

Heikki Linnakangas
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c
src/include/nodes/pg_list.h