summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2019-06-28 11:11:26 +1200
committerThomas Munro <tmunro@postgresql.org>2019-06-28 17:18:06 +1200
commitd7395cf608e7ec8c9cebd17c19dc5d07c761010e (patch)
treeb685dd9a75abc92740af43c1fe87e71ec3c0d1b9
parent88d63c6ac78de0a9c8bffc43146666e630efc426 (diff)
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. Reviewed-by: Ashwin Agrawal Discussion: https://postgr.es/m/CAEepm%3D2GK3FVdnt5V3d%2Bh9njWipCv_fNL%3DwjxyUhzsF%3D0PcbNg%40mail.gmail.com
-rw-r--r--src/backend/executor/nodeIndexonlyscan.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c
index 9f54c4633e8..87c2656a54a 100644
--- a/src/backend/executor/nodeIndexonlyscan.c
+++ b/src/backend/executor/nodeIndexonlyscan.c
@@ -179,11 +179,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 == NULL)
PredicateLockPage(scandesc->heapRelation,