Skip site navigation (1) Skip section navigation (2)

pgsql: Various micro-optimizations for GetSnapshopData().

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Various micro-optimizations for GetSnapshopData().
Date: 2011-12-17 02:49:59
Message-ID: E1RbkLX-0004Bx-Uv@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Various micro-optimizations for GetSnapshopData().

Heikki Linnakangas had the idea of rearranging GetSnapshotData to
avoid checking for sub-XIDs when no top-level XID is present.  This
patch does that plus further a bit of further, related rearrangement.
Benchmarking show a significant improvement on unlogged tables at
higher concurrency levels, and mostly indifferent result on permanent
tables (which are presumably bottlenecked elsewhere).  Most of the
benefit seems to come from using the new NormalTransactionIdPrecedes()
macro rather than the function call TransactionIdPrecedes().

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0d76b60db4684d3487223b003833828fe9655fe2

Modified Files
--------------
src/backend/storage/ipc/procarray.c |   37 ++++++++++++++++++----------------
src/include/access/transam.h        |    4 +++
2 files changed, 24 insertions(+), 17 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2011-12-17 04:19:31
Subject: pgsql: Add missing 'static' qualifier.
Previous:From: User FxjrDate: 2011-12-17 02:42:27
Subject: npgsql - Npgsql2: Fixed line endings.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group