Fix TransactionIdIsCurrentTransactionId() to use binary search instead of
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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 |