0001-Fix-misleading-comment-in-nodeIndexonlyscan.c.patch
application/octet-stream
Filename: 0001-Fix-misleading-comment-in-nodeIndexonlyscan.c.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch 0001
Subject: Fix misleading comment in nodeIndexonlyscan.c.
| File | + | − |
|---|---|---|
| src/backend/executor/nodeIndexonlyscan.c | 2 | 5 |
From 3097e1b7973e83b7ce05e5c81e3696852c0a7806 Mon Sep 17 00:00:00 2001
From: Thomas Munro <tmunro@postgresql.org>
Date: Fri, 28 Jun 2019 11:11:26 +1200
Subject: [PATCH] Fix misleading comment in nodeIndexonlyscan.c.
The stated reason for acquiring predicate locks on heap pages hasn't
existed since commit c01262a8, so fix the comment. Perhaps in a later
release we'll also be able to change the code to use tuple locks.
Back-patch all the way.
Discussion: https://postgr.es/m/CAEepm%3D2GK3FVdnt5V3d%2Bh9njWipCv_fNL%3DwjxyUhzsF%3D0PcbNg%40mail.gmail.com
---
src/backend/executor/nodeIndexonlyscan.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c
index 8a4d795d1a..f0f8fa210b 100644
--- a/src/backend/executor/nodeIndexonlyscan.c
+++ b/src/backend/executor/nodeIndexonlyscan.c
@@ -242,11 +242,8 @@ IndexOnlyNext(IndexOnlyScanState *node)
errmsg("lossy distance functions are not supported in index-only scans")));
/*
- * Predicate locks for index-only scans must be acquired at the page
- * level when the heap is not accessed, since tuple-level predicate
- * locks need the tuple's xmin value. If we had to visit the tuple
- * anyway, then we already have the tuple-level lock and can skip the
- * page lock.
+ * If we didn't access the heap, then we'll need to take a predicate
+ * lock explicitly, as if we had. For now we do that at page level.
*/
if (!tuple_from_heap)
PredicateLockPage(scandesc->heapRelation,
--
2.21.0