diff options
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r-- | src/backend/access/heap/heapam.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 1accdd9d99a..e8199b309b7 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -2513,6 +2513,14 @@ heap_multi_insert(Relation relation, HeapTuple *tuples, int ntuples, info |= XLOG_HEAP_INIT_PAGE; } + /* + * Signal that this is the last xl_heap_multi_insert record + * emitted by this call to heap_multi_insert(). Needed for logical + * decoding so it knows when to cleanup temporary data. + */ + if (ndone + nthispage == ntuples) + xlrec->flags |= XLOG_HEAP_LAST_MULTI_INSERT; + recptr = XLogInsert(RM_HEAP2_ID, info, rdata); PageSetLSN(page, recptr); |