Re: SRF memory leaks - Mailing list pgsql-patches

From Neil Conway
Subject Re: SRF memory leaks
Date
Msg-id 1204056588.29147.26.camel@dell.linuxdev.us.dell.com
Whole thread Raw
In response to Re: SRF memory leaks  (Neil Conway <neilc@samurai.com>)
Responses Re: SRF memory leaks  (Neil Conway <neilc@samurai.com>)
Re: SRF memory leaks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Tue, 2008-02-26 at 00:17 -0800, Neil Conway wrote:
> You didn't comment on my proposed solution (FreeTupleDesc() iff refcount
> == -1).

Attached is a revised version of this patch. It makes the
FreeTupleDesc() change described above, and fixes a bug: in
SRF_RETURN_DONE(), we need to be sure to switch back to the caller's
context before deleting the multi_call_ctx, since some SRFs (e.g.
dblink) call SRF_RETURN_DONE() while still inside the multi_call_ctx.

I'd like to apply this change to back branches reasonably soon, so if
you have a better way to do the FreeTupleDesc() hack, let me know.

-Neil


Attachment

pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Bulk Insert tuning
Next
From: Tom Lane
Date:
Subject: Re: Bulk Insert tuning