Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2-2
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)