Content-Length: 274270 | pFad | http://github.com/postgrespro/postgres/commit/e93c0b820f03e96ae0549cd30805ae734e5d5e2f

F7 After PageSetAllVisible, use MarkBufferDirty. · postgrespro/postgres@e93c0b8 · GitHub
Skip to content

Commit e93c0b8

Browse files
committed
After PageSetAllVisible, use MarkBufferDirty.
Previously, we used SetBufferCommitInfoNeedsSave, but that's really intended for dirty-marks we can theoretically afford to lose, such as hint bits. As for 9.2, the PD_ALL_VISIBLE mustn't be lost in this way, since we could then end up with a heap page that isn't all-visible and a visibility map page that is all visible, causing index-only scans to return wrong answers.
1 parent b5eccae commit e93c0b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/commands/vacuumlazy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
603603
if (!PageIsAllVisible(page))
604604
{
605605
PageSetAllVisible(page);
606-
SetBufferCommitInfoNeedsSave(buf);
606+
MarkBufferDirty(buf);
607607
}
608608

609609
LockBuffer(buf, BUFFER_LOCK_UNLOCK);
@@ -838,7 +838,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
838838
if (!PageIsAllVisible(page) && all_visible)
839839
{
840840
PageSetAllVisible(page);
841-
SetBufferCommitInfoNeedsSave(buf);
841+
MarkBufferDirty(buf);
842842
}
843843

844844
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/e93c0b820f03e96ae0549cd30805ae734e5d5e2f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy