heap_tuple_needs_freeze.patch

application/octet-stream

Filename: heap_tuple_needs_freeze.patch
Type: application/octet-stream
Part: 0
Message: heap_tuple_needs_freeze false positive

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/access/heap/heapam.c 8 0
*** a/src/backend/access/heap/heapam.c
--- b/src/backend/access/heap/heapam.c
***************
*** 4105,4116 **** heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid,
  		TransactionIdPrecedes(xid, cutoff_xid))
  		return true;
  
! 	if (!(tuple->t_infomask & HEAP_XMAX_IS_MULTI))
  	{
! 		xid = HeapTupleHeaderGetXmax(tuple);
! 		if (TransactionIdIsNormal(xid) &&
! 			TransactionIdPrecedes(xid, cutoff_xid))
! 			return true;
  	}
  
  	if (tuple->t_infomask & HEAP_MOVED)
--- 4105,4119 ----
  		TransactionIdPrecedes(xid, cutoff_xid))
  		return true;
  
! 	if (!(tuple->t_infomask & HEAP_XMAX_INVALID))
  	{
! 		if (!(tuple->t_infomask & HEAP_XMAX_IS_MULTI))
! 		{
! 			xid = HeapTupleHeaderGetXmax(tuple);
! 			if (TransactionIdIsNormal(xid) &&
! 				TransactionIdPrecedes(xid, cutoff_xid))
! 				return true;
! 		}
  	}
  
  	if (tuple->t_infomask & HEAP_MOVED)