]> granicus.if.org Git - postgresql/commit
Avoid having two copies of the HOT-chain search logic.
authorRobert Haas <rhaas@postgresql.org>
Mon, 27 Jun 2011 14:27:17 +0000 (10:27 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 27 Jun 2011 14:27:17 +0000 (10:27 -0400)
commit4da99ea4231e3d8bbf28b666748c1028e7b7d665
treec91fede8b34009adc608d542ec3ebbc5fab20c0c
parent8c8745b298d20b49e64c77c1e4ba4c8ac300e9e6
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.
src/backend/access/heap/heapam.c
src/backend/access/index/genam.c
src/backend/access/index/indexam.c
src/backend/executor/nodeBitmapHeapscan.c
src/include/access/heapam.h
src/include/access/relscan.h