-
-
Save alex-richman-onesignal/4ad147b37eaab99f41a150b51899a564 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c | |
index ea37b0bbe8..81367ce808 100644 | |
--- a/src/backend/replication/logical/reorderbuffer.c | |
+++ b/src/backend/replication/logical/reorderbuffer.c | |
@@ -554,10 +554,13 @@ ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len) | |
alloc_len = tuple_len + SizeofHeapTupleHeader; | |
- tuple = (ReorderBufferTupleBuf *) | |
+/* tuple = (ReorderBufferTupleBuf *) | |
MemoryContextAlloc(rb->tup_context, | |
sizeof(ReorderBufferTupleBuf) + | |
- MAXIMUM_ALIGNOF + alloc_len); | |
+ MAXIMUM_ALIGNOF + alloc_len);*/ | |
+ tuple = (ReorderBufferTupleBuf *)malloc(sizeof(ReorderBufferTupleBuf) + | |
+ MAXIMUM_ALIGNOF + alloc_len); | |
+ | |
tuple->alloc_tuple_size = alloc_len; | |
tuple->tuple.t_data = ReorderBufferTupleBufData(tuple); | |
@@ -570,7 +573,8 @@ ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len) | |
void | |
ReorderBufferReturnTupleBuf(ReorderBuffer *rb, ReorderBufferTupleBuf *tuple) | |
{ | |
- pfree(tuple); | |
+// pfree(tuple); | |
+ free(tuple); | |
} | |
/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment