Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8862E2E022F for ; Sun, 16 Mar 2008 23:19:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16986-04 for ; Sun, 16 Mar 2008 23:18:58 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by postgresql.org (Postfix) with ESMTP id AA95B2E018D for ; Sun, 16 Mar 2008 23:18:57 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 0D2D37558DC; Mon, 17 Mar 2008 02:18:56 +0000 (UTC) MIME-Version: 1.0 To: pgsql-committers@postgresql.org Subject: pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search X-Mailer: activitymail 1.24, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain Message-Id: <20080317021856.0D2D37558DC@cvs.postgresql.org> Date: Mon, 17 Mar 2008 02:18:56 +0000 (UTC) From: tgl@postgresql.org (Tom Lane) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/313 X-Sequence-Number: 32289 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)