Skip to content

Commit d5f6fa9

Browse files
author
Konstantin Knizhnik
committed
Fix retstorig cid in heap redo
1 parent f583581 commit d5f6fa9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/backend/access/heap/heapam.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9098,7 +9098,7 @@ heap_xlog_delete(XLogReaderState *record)
90989098
HeapTupleHeaderSetXmax(htup, xlrec->xmax);
90999099
else
91009100
HeapTupleHeaderSetXmin(htup, InvalidTransactionId);
9101-
HeapTupleHeaderSetCmax(htup, xlrec->t_cid, false);
9101+
htup->t_choice.t_heap.t_field3.t_cid = xlrec->t_cid;
91029102

91039103
/* Mark the page as a candidate for pruning */
91049104
PageSetPrunable(page, XLogRecGetXid(record));
@@ -9199,7 +9199,7 @@ heap_xlog_insert(XLogReaderState *record)
91999199
htup->t_infomask = xlhdr.t_infomask;
92009200
htup->t_hoff = xlhdr.t_hoff;
92019201
HeapTupleHeaderSetXmin(htup, XLogRecGetXid(record));
9202-
HeapTupleHeaderSetCmin(htup, xlhdr.t_cid);
9202+
htup->t_choice.t_heap.t_field3.t_cid = xlhdr.t_cid;
92039203
htup->t_ctid = target_tid;
92049204

92059205
if (PageAddItem(page, (Item) htup, newlen, xlrec->offnum,
@@ -9342,7 +9342,7 @@ heap_xlog_multi_insert(XLogReaderState *record)
93429342
htup->t_infomask = xlhdr->t_infomask;
93439343
htup->t_hoff = xlhdr->t_hoff;
93449344
HeapTupleHeaderSetXmin(htup, XLogRecGetXid(record));
9345-
HeapTupleHeaderSetCmin(htup, xlhdr->t_cid);
9345+
htup->t_choice.t_heap.t_field3.t_cid = xlhdr->t_cid;
93469346
ItemPointerSetBlockNumber(&htup->t_ctid, blkno);
93479347
ItemPointerSetOffsetNumber(&htup->t_ctid, offnum);
93489348

@@ -9482,7 +9482,7 @@ heap_xlog_update(XLogReaderState *record, bool hot_update)
94829482
fix_infomask_from_infobits(xlrec->old_infobits_set, &htup->t_infomask,
94839483
&htup->t_infomask2);
94849484
HeapTupleHeaderSetXmax(htup, xlrec->old_xmax);
9485-
HeapTupleHeaderSetCmax(htup, xlrec->t_cid, false);
9485+
htup->t_choice.t_heap.t_field3.t_cid = xlrec->t_cid;
94869486
/* Set forward chain link in t_ctid */
94879487
htup->t_ctid = newtid;
94889488

@@ -9615,7 +9615,7 @@ heap_xlog_update(XLogReaderState *record, bool hot_update)
96159615
htup->t_hoff = xlhdr.t_hoff;
96169616

96179617
HeapTupleHeaderSetXmin(htup, XLogRecGetXid(record));
9618-
HeapTupleHeaderSetCmin(htup, xlhdr.t_cid);
9618+
htup->t_choice.t_heap.t_field3.t_cid = xlhdr.t_cid;
96199619
HeapTupleHeaderSetXmax(htup, xlrec->new_xmax);
96209620
/* Make sure there is no forward chain link in t_ctid */
96219621
htup->t_ctid = newtid;
@@ -9756,7 +9756,7 @@ heap_xlog_lock(XLogReaderState *record)
97569756
offnum);
97579757
}
97589758
HeapTupleHeaderSetXmax(htup, xlrec->locking_xid);
9759-
HeapTupleHeaderSetCmax(htup, xlrec->t_cid, false);
9759+
htup->t_choice.t_heap.t_field3.t_cid = xlrec->t_cid;
97609760
PageSetLSN(page, lsn);
97619761
MarkBufferDirty(buffer);
97629762
}

0 commit comments

Comments
 (0)
close