Skip site navigation (1) Skip section navigation (2)

Re: SRF memory leaks

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SRF memory leaks
Date: 2008-02-26 20:09:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


Attachment: srf_memory_leak-3.patch
Description: text/x-patch (3.5 KB)

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2008-02-26 20:12:58
Subject: Re: Bulk Insert tuning
Previous:From: Gevik BabakhaniDate: 2008-02-26 19:09:37
Subject: Re: lc_time and localized dates

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group