diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-06-27 10:27:17 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-06-27 10:27:17 -0400 |
commit | 4da99ea4231e3d8bbf28b666748c1028e7b7d665 (patch) | |
tree | c91fede8b34009adc608d542ec3ebbc5fab20c0c /src/include/access/heapam.h | |
parent | 8c8745b298d20b49e64c77c1e4ba4c8ac300e9e6 (diff) | |
download | postgresql-4da99ea4231e3d8bbf28b666748c1028e7b7d665.tar.gz postgresql-4da99ea4231e3d8bbf28b666748c1028e7b7d665.zip |
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.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r-- | src/include/access/heapam.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index fc657612ed0..ee474d6c909 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -83,7 +83,8 @@ extern bool heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tuple, Buffer *userbuf, bool keep_buf, Relation stats_relation); extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation, - Buffer buffer, Snapshot snapshot, bool *all_dead); + Buffer buffer, Snapshot snapshot, HeapTuple heapTuple, + bool *all_dead, bool first_call); extern bool heap_hot_search(ItemPointer tid, Relation relation, Snapshot snapshot, bool *all_dead); |