mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Remove unused check in heap_xlog_insert()
8e03eb92e9reverted the commit39b66a91bdwhich 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
This commit is contained in:
		@@ -9613,6 +9613,9 @@ heap_xlog_insert(XLogReaderState *record)
 | 
			
		||||
	ItemPointerSetBlockNumber(&target_tid, blkno);
 | 
			
		||||
	ItemPointerSetOffsetNumber(&target_tid, xlrec->offnum);
 | 
			
		||||
 | 
			
		||||
	/* No freezing in the heap_insert() code path */
 | 
			
		||||
	Assert(!(xlrec->flags & XLH_INSERT_ALL_FROZEN_SET));
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * The visibility map may need to be fixed even if the heap page is
 | 
			
		||||
	 * already up-to-date.
 | 
			
		||||
@@ -9683,10 +9686,6 @@ heap_xlog_insert(XLogReaderState *record)
 | 
			
		||||
		if (xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED)
 | 
			
		||||
			PageClearAllVisible(page);
 | 
			
		||||
 | 
			
		||||
		/* XLH_INSERT_ALL_FROZEN_SET implies that all tuples are visible */
 | 
			
		||||
		if (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET)
 | 
			
		||||
			PageSetAllVisible(page);
 | 
			
		||||
 | 
			
		||||
		MarkBufferDirty(buffer);
 | 
			
		||||
	}
 | 
			
		||||
	if (BufferIsValid(buffer))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user