Fix TransactionIdIsCurrentTransactionId() to use binary search instead of

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 32846f815265b134b6ec2d20f16bf2d0c9e6f931
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-03-17T02:18:55Z
Releases: 8.4.0
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

Files

PathChange+/−
src/backend/access/transam/twophase.c modified +1 −2
src/backend/access/transam/xact.c modified +126 −58
src/include/nodes/pg_list.h modified +1 −12