mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 15:11:18 +02:00
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
This commit is contained in:
parent
69fd82fedd
commit
74b7cc8c02
@ -242,11 +242,8 @@ IndexOnlyNext(IndexOnlyScanState *node)
|
|||||||
errmsg("lossy distance functions are not supported in index-only scans")));
|
errmsg("lossy distance functions are not supported in index-only scans")));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Predicate locks for index-only scans must be acquired at the page
|
* If we didn't access the heap, then we'll need to take a predicate
|
||||||
* level when the heap is not accessed, since tuple-level predicate
|
* lock explicitly, as if we had. For now we do that at page level.
|
||||||
* 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 (!tuple_from_heap)
|
if (!tuple_from_heap)
|
||||||
PredicateLockPage(scandesc->heapRelation,
|
PredicateLockPage(scandesc->heapRelation,
|
||||||
|
Loading…
Reference in New Issue
Block a user