From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: dblink memory leak |
Date: | 2009-10-05 18:59:11 |
Message-ID: | 4ACA41FF.8060509@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>> Given that change, is there even any leak to even worry about? As long
>> as the PGresult object is created in the correct memory context, it
>> ought to get cleaned up automatically, no?
>
> No, because libpq knows nothing of backend memory contexts; it just
> allocates with malloc. You'll still need a PG_TRY block to ensure you
> release PGresults during error cleanup. The change to using tuplestores
> will just help you localize that requirement in well-defined places.
I should have known that! Thanks for the wack on the head...
>> I can't promise to make this change before 15 October, but I will get to
>> it before the end of CF3.
>
> No big hurry, I think, considering the leak has always been there.
Great. It seems like this is too invasive a change to backport. My
feeling is that not enough people have complained about this specific
scenario to warrant the risk.
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-05 19:34:05 | Re: [PATCH] DefaultACLs |
Previous Message | Josh Berkus | 2009-10-05 18:58:20 | Re: Privileges and inheritance |