diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 570400ffb736aae75927f8286e9e965391539a31..e2ad4728cdc6932ec15cf91f6b7c6247aadd0fca 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -483,7 +483,8 @@ ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len) { tuple = (ReorderBufferTupleBuf *) MemoryContextAlloc(rb->context, - sizeof(ReorderBufferTupleBuf) + alloc_len); + sizeof(ReorderBufferTupleBuf) + + MAXIMUM_ALIGNOF + alloc_len); tuple->alloc_tuple_size = alloc_len; tuple->tuple.t_data = ReorderBufferTupleBufData(tuple); }