pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search
Date: 2008-03-17 02:18:56
Message-ID: 20080317021856.0D2D37558DC@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers pgsql-performance

Log Message:
-----------
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

Modified Files:
--------------
pgsql/src/backend/access/transam:
twophase.c (r1.39 -> r1.40)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c?r1=1.39&r2=1.40)
xact.c (r1.258 -> r1.259)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.258&r2=1.259)
pgsql/src/include/nodes:
pg_list.h (r1.57 -> r1.58)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/pg_list.h?r1=1.57&r2=1.58)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message User Jbcooley 2008-03-17 02:55:28 npgsql - Npgsql2: Added support for INTERSECT and EXCEPT.
Previous Message Bruce Momjian 2008-03-17 01:46:42 pgsql: Done: > o -During index creation, pre-sort the tuples to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-03-17 02:19:27 Re: Commit fest?
Previous Message Tom Lane 2008-03-17 02:13:10 Re: Commit fest?

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-03-17 02:20:39 Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Previous Message Scott Marlowe 2008-03-16 20:56:26 Re: Benchmark: Dell/Perc 6, 8 disk RAID 10