Re: possible memory leak with SRFs - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: possible memory leak with SRFs
Date
Msg-id i2wa301bfd91005072106w7ae06eb8s51c4a54fd8a693a9@mail.gmail.com
Whole thread Raw
In response to Re: possible memory leak with SRFs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: possible memory leak with SRFs
Re: possible memory leak with SRFs
List pgsql-hackers
>> Yeah this is my basic confusion. But wouldn't the arguments be
>> evaluated afresh on the subsequent call for this SRF?
>
> No, see ExecMakeFunctionResult().  If we did that we'd have serious
> problems with volatile functions, ie srf(random()).
>

Ok thanks. So if someone uses a really long-running srf with argument
expression evaluations thrown in, then running into "out of memory"
issues should be expected and then in those cases they are better off
using multiple srf calls to get the same effect if they can..

Regards,
Nikhils
--
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: beta to release
Next
From: Craig Ringer
Date:
Subject: Re: no universally correct setting for fsync