I wrote:
> Jeff Janes <jeff.janes@gmail.com> writes:
>> The culprit is f2dec34e19d3969ddd6.
> Hmm. I bet problem is that the buf isn't being freed in
> printtup_shutdown.
Yup; the attached fixes it. Will push after a bit more testing.
regards, tom lane
diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c
index e4ee5c9..5eb928b 100644
*** a/src/backend/access/common/printtup.c
--- b/src/backend/access/common/printtup.c
*************** printtup_create_DR(CommandDest dest)
*** 91,96 ****
--- 91,97 ----
*/
self->sendDescrip = (dest == DestRemote);
+ self->buf.data = NULL;
self->attrinfo = NULL;
self->nattrs = 0;
self->myinfo = NULL;
*************** printtup_shutdown(DestReceiver *self)
*** 547,552 ****
--- 548,557 ----
if (myState->tmpcontext)
MemoryContextDelete(myState->tmpcontext);
myState->tmpcontext = NULL;
+
+ if (myState->buf.data)
+ pfree(myState->buf.data);
+ myState->buf.data = NULL;
}
/* ----------------