Skip to content

Commit 483f724

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 060f420 commit 483f724

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/access/heap/heapam_xlog.c

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

441+
/* No freezing in the heap_insert() code path */
442+
Assert(!(xlrec->flags & XLH_INSERT_ALL_FROZEN_SET));
443+
441444
/*
442445
* The visibility map may need to be fixed even if the heap page is
443446
* already up-to-date.
@@ -508,10 +511,6 @@ heap_xlog_insert(XLogReaderState *record)
508511
if (xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED)
509512
PageClearAllVisible(page);
510513

511-
/* XLH_INSERT_ALL_FROZEN_SET implies that all tuples are visible */
512-
if (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET)
513-
PageSetAllVisible(page);
514-
515514
MarkBufferDirty(buffer);
516515
}
517516
if (BufferIsValid(buffer))

0 commit comments

Comments
 (0)