From 003811042139790a5a479c8264271a3248eda36f Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 2 May 2012 12:40:07 -0400 Subject: Avoid repeated CLOG access from heap_hot_search_buffer. At the time we check whether the tuple is dead to all running transactions, we've already verified that it isn't visible to our scan, setting hint bits if appropriate. So there's no need to recheck CLOG for the all-dead test we do just a moment later. So, add HeapTupleIsSurelyDead() to test the appropriate condition under the assumption that all relevant hit bits are already set. Review by Tom Lane. --- src/include/utils/tqual.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/utils') diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 0f8a7f8c2d2..3d8a480d810 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -83,6 +83,8 @@ extern HTSU_Result HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid, Buffer buffer); extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, Buffer buffer); +extern bool HeapTupleIsSurelyDead(HeapTupleHeader tuple, + TransactionId OldestXmin); extern void HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer, uint16 infomask, TransactionId xid); -- cgit v1.2.3