Re: possible memory leak with SRFs
Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
From: Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-05-08T04:06:50Z
Lists: 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