While waiting for help I decided to fix my problem by
brute-forcing it. I commented out offending call to pfree()
in src/backend/commands/copy.c at line 671. I may introduced
a memory leak, but it works fine for me now.
Best regards,
Nic.
*** ./src/backend/commands/copy.c.orig Sun Dec 1 06:02:34 2002
--- ./src/backend/commands/copy.c Sun Dec 1 06:02:48 2002
***************
*** 668,674 ****
ObjectIdGetDatum(elements[attnum - 1]),
Int32GetDatum(attr[attnum - 1]->atttypmod)));
CopyAttributeOut(fp, string, delim);
! pfree(string);
}
else
{
--- 668,674 ----
ObjectIdGetDatum(elements[attnum - 1]),
Int32GetDatum(attr[attnum - 1]->atttypmod)));
CopyAttributeOut(fp, string, delim);
! /*pfree(string);*/
}
else
{