Skip to content

Commit 5a24c20

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 c079ba3 commit 5a24c20

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
@@ -9396,6 +9396,9 @@ heap_xlog_insert(XLogReaderState *record)
93969396
ItemPointerSetBlockNumber(&target_tid, blkno);
93979397
ItemPointerSetOffsetNumber(&target_tid, xlrec->offnum);
93989398

9399+
/* No freezing in the heap_insert() code path */
9400+
Assert(!(xlrec->flags & XLH_INSERT_ALL_FROZEN_SET));
9401+
93999402
/*
94009403
* The visibility map may need to be fixed even if the heap page is
94019404
* already up-to-date.
@@ -9466,10 +9469,6 @@ heap_xlog_insert(XLogReaderState *record)
94669469
if (xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED)
94679470
PageClearAllVisible(page);
94689471

9469-
/* XLH_INSERT_ALL_FROZEN_SET implies that all tuples are visible */
9470-
if (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET)
9471-
PageSetAllVisible(page);
9472-
94739472
MarkBufferDirty(buffer);
94749473
}
94759474
if (BufferIsValid(buffer))

0 commit comments

Comments
 (0)