Re: Memory leaks on SRF rescan

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory leaks on SRF rescan
Date: 2008-02-22 02:48:34
Message-ID: 1203648514.20306.76.camel@goldbach
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2008-02-21 at 21:42 -0500, Tom Lane wrote:
> Given your point (2), is this worth fixing by itself?

Right, probably not.

> Yeah. I think it's hopeless to expect these functions to all hew to
> the straight and narrow path. It seems to me that the right way is for
> the sub-select to somehow run in its own "per-query" context.

Hmm, I was thinking of just fixing this by arranging for the
FuncCallContext's multi-call context to be a special context created by
the function scan, and that is reset/deleted at the appropriate time.
Would this not fix the issue as well?

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2008-02-22 02:59:50 Re: Including PL/PgSQL by default
Previous Message Tom Lane 2008-02-22 02:42:39 Re: Memory leaks on SRF rescan