Re: Segmentation fault while COPY in 7.3

From: Nicolai Tufar <ntufar(at)apb(dot)com(dot)tr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Segmentation fault while COPY in 7.3
Date: 2002-12-01 04:20:50
Message-ID: Pine.GSO.4.10.10212010613570.27674-100000@prana
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers

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
{

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message David Wheeler 2002-12-01 04:24:17 Re: 7.4 Wishlist
Previous Message Nicolai Tufar 2002-12-01 03:52:46 Segmentation fault while COPY in 7.3

Browse pgsql-general by date

  From Date Subject
Next Message David Wheeler 2002-12-01 04:24:17 Re: 7.4 Wishlist
Previous Message Tom Lane 2002-12-01 04:14:43 Re: USAGE on schema allowed by default?

Browse pgsql-hackers by date

  From Date Subject
Next Message David Wheeler 2002-12-01 04:24:17 Re: 7.4 Wishlist
Previous Message Rod Taylor 2002-12-01 04:18:10 Re: Wishlist for 7.4: Plan stability