Forgot to call RestoreBkpBlocks() in the redo-function, as pointed out by
Simon Riggs. In redo of a regular heap insert, it's taken care of in
heap_redo(), but this new record type uses the heap2 RM, and heap2_redo()
does not take care of that for you.
Also, failed to reset the vmbuffer and all_visibile_cleared local variables
after switching to a new buffer.
{
TransactionId xid = GetCurrentTransactionId();
HeapTuple *heaptuples;
- Buffer buffer;
- Buffer vmbuffer = InvalidBuffer;
- bool all_visible_cleared = false;
int i;
int ndone;
char *scratch = NULL;
ndone = 0;
while (ndone < ntuples)
{
+ Buffer buffer;
+ Buffer vmbuffer = InvalidBuffer;
+ bool all_visible_cleared = false;
int nthispage;
/*
int i;
bool isinit = (record->xl_info & XLOG_HEAP_INIT_PAGE) != 0;
+ /*
+ * Insertion doesn't overwrite MVCC data, so no conflict processing is
+ * required.
+ */
+
+ RestoreBkpBlocks(lsn, record, false);
+
xlrec = (xl_heap_multi_insert *) recdata;
recdata += SizeOfHeapMultiInsert;