Re: possible memory leak with SRFs

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: possible memory leak with SRFs
Date: 2010-05-08 04:06:50
Message-ID: i2wa301bfd91005072106w7ae06eb8s51c4a54fd8a693a9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2010-05-08 08:07:01 Re: no universally correct setting for fsync
Previous Message Marc G. Fournier 2010-05-08 04:04:34 Re: beta to release