diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-17 02:18:55 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-17 02:18:55 +0000 |
| commit | 32846f815265b134b6ec2d20f16bf2d0c9e6f931 (patch) | |
| tree | 2b04b90bcce876ac7f6ed431adc6fdc5cdc5d6ea /src/include | |
| parent | a7c58abeb1d510a31098b1eb706ae18b662af8df (diff) | |
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
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/nodes/pg_list.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index 4f02eae5787..fc9331939d7 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -26,16 +26,11 @@ * (At the moment, ints and Oids are the same size, but they may not * always be so; try to be careful to maintain the distinction.) * - * There is also limited support for lists of TransactionIds; since these - * are used in only one or two places, we don't provide a full implementation, - * but map them onto Oid lists. This effectively assumes that TransactionId - * is no wider than Oid and both are unsigned types. - * * * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.57 2008/01/01 19:45:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.58 2008/03/17 02:18:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -160,12 +155,6 @@ extern int list_length(List *l); #define list_make4_oid(x1,x2,x3,x4) lcons_oid(x1, list_make3_oid(x2, x3, x4)) /* - * Limited support for lists of TransactionIds, mapped onto lists of Oids - */ -#define lfirst_xid(lc) ((TransactionId) lfirst_oid(lc)) -#define lappend_xid(list, datum) lappend_oid(list, (Oid) (datum)) - -/* * foreach - * a convenience macro which loops through the list */ |
