Move comment about test slightly closer to test.
authorRobert Haas
Tue, 31 Jan 2017 22:12:54 +0000 (17:12 -0500)
committerRobert Haas
Tue, 31 Jan 2017 22:21:02 +0000 (17:21 -0500)
The addition of a TestForOldSnapshot() call here has made the
referent of this comment slightly less clear, so move the comment
to compensate.

Amit Kapila (as part of the parallel index scan patch)

src/backend/access/nbtree/nbtsearch.c

index 4fba75aaf66a613ed198894384c2708f5d47ea29..b6459d2f2a0e434b816e95a34109d35e9f070600 100644 (file)
@@ -1345,10 +1345,10 @@ _bt_steppage(IndexScanDesc scan, ScanDirection dir)
            CHECK_FOR_INTERRUPTS();
            /* step right one page */
            so->currPos.buf = _bt_getbuf(rel, blkno, BT_READ);
-           /* check for deleted page */
            page = BufferGetPage(so->currPos.buf);
            TestForOldSnapshot(scan->xs_snapshot, rel, page);
            opaque = (BTPageOpaque) PageGetSpecialPointer(page);
+           /* check for deleted page */
            if (!P_IGNORE(opaque))
            {
                PredicateLockPage(rel, blkno, scan->xs_snapshot);