Skip to content

Commit 98dd121

Browse files
Remove unused check in heap_xlog_insert()
8e03eb9 reverted the commit 39b66a9 which allowed freezing in the heap_insert() code path but forgot to remove the corresponding check in heap_xlog_insert(). This code is extraneous but not harmful. However, cleaning it up makes it very clear that, as of now, we do not support any freezing of pages in the heap_insert() path. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Tomas Vondra <tomas@vondra.me> Discussion: https://postgr.es/m/flat/CAAKRu_Zp4Pi-t51OFWm1YZ-cctDfBhHCMZ%3DEx6PKxv0o8y2GvA%40mail.gmail.com Backpatch-through: 14
1 parent ba33505 commit 98dd121

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/access/heap/heapam.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9569,6 +9569,9 @@ heap_xlog_insert(XLogReaderState *record)
95699569
ItemPointerSetBlockNumber(&target_tid, blkno);
95709570
ItemPointerSetOffsetNumber(&target_tid, xlrec->offnum);
95719571

9572+
/* No freezing in the heap_insert() code path */
9573+
Assert(!(xlrec->flags & XLH_INSERT_ALL_FROZEN_SET));
9574+
95729575
/*
95739576
* The visibility map may need to be fixed even if the heap page is
95749577
* already up-to-date.
@@ -9639,10 +9642,6 @@ heap_xlog_insert(XLogReaderState *record)
96399642
if (xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED)
96409643
PageClearAllVisible(page);
96419644

9642-
/* XLH_INSERT_ALL_FROZEN_SET implies that all tuples are visible */
9643-
if (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET)
9644-
PageSetAllVisible(page);
9645-
96469645
MarkBufferDirty(buffer);
96479646
}
96489647
if (BufferIsValid(buffer))

0 commit comments

Comments
 (0)