pgsql: Avoid having two copies of the HOT-chain search logic.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid having two copies of the HOT-chain search logic.
Date: 2011-06-27 14:31:49
Message-ID: E1QbCqr-0005oe-I2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid having two copies of the HOT-chain search logic.

It's been like this since HOT was originally introduced, but the logic
is complex enough that this is a recipe for bugs, as we've already
found out with SSI. So refactor heap_hot_search_buffer() so that it
can satisfy the needs of index_getnext(), and make index_getnext() use
that rather than duplicating the logic.

This change was originally proposed by Heikki Linnakangas as part of a
larger refactoring oriented towards allowing index-only scans. I
extracted and adjusted this part, since it seems to have independent
merit. Review by Jeff Davis.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4da99ea4231e3d8bbf28b666748c1028e7b7d665

Modified Files
--------------
src/backend/access/heap/heapam.c | 72 ++++++++-----
src/backend/access/index/genam.c | 4 +-
src/backend/access/index/indexam.c | 174 ++++-------------------------
src/backend/executor/nodeBitmapHeapscan.c | 4 +-
src/include/access/heapam.h | 3 +-
src/include/access/relscan.h | 4 +-
6 files changed, 74 insertions(+), 187 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-06-27 14:40:27 pgsql: Mention that SSPI authentication can use GSSAPI on non-Windows s
Previous Message Peter Eisentraut 2011-06-27 12:47:09 pgsql: Remove redundant DEF_PGPORT handling