Skip to content

Commit 5b86779

Browse files
author
Konstantin Knizhnik
committed
Fix bug in storing CID to oldrecord in heap_update
1 parent a2e3993 commit 5b86779

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/access/heap/heapam.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8501,11 +8501,12 @@ log_heap_update(Relation reln, Buffer oldbuf,
85018501
xlrec.old_xmax = HeapTupleHeaderGetRawXmax(oldtup->t_data);
85028502
xlrec.old_infobits_set = compute_infobits(oldtup->t_data->t_infomask,
85038503
oldtup->t_data->t_infomask2);
8504+
xlrec.t_cid = HeapTupleHeaderGetRawCommandId(oldtup->t_data);
85048505

85058506
/* Prepare WAL data for the new page */
85068507
xlrec.new_offnum = ItemPointerGetOffsetNumber(&newtup->t_self);
85078508
xlrec.new_xmax = HeapTupleHeaderGetRawXmax(newtup->t_data);
8508-
xlrec.t_cid = HeapTupleHeaderGetRawCommandId(oldtup->t_data);
8509+
85098510
bufflags = REGBUF_STANDARD;
85108511
if (init)
85118512
bufflags |= REGBUF_WILL_INIT;

0 commit comments

Comments
 (0)
close