From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vincent Dautremont <vincent@searidgetech.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: out of memory error
Date: Tue, 22 May 2012 16:04:55 -0400
Message-ID: <7269.1337717095@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4Vp48agd55BnZDtfAOQrDAJqxy=+Gy1c=kxY6V9NAruFbmaQ@mail.gmail.com>
References: <CAA4Vp4_pD3tc8dT8rtdPjO4vQfW+eyuNpYb72HPYYRokdPHS7A@mail.gmail.com>
<3902.1337708023@sss.pgh.pa.us>
<CAA4Vp48tDW5vRA3t=WqEJzwYfDY1wmZ=YwDgPkaZ8ktMwUsUaQ@mail.gmail.com>
<5105.1337711403@sss.pgh.pa.us>
<CAA4Vp48agd55BnZDtfAOQrDAJqxy=+Gy1c=kxY6V9NAruFbmaQ@mail.gmail.com>
Vincent Dautremont <vincent@searidgetech.com> writes:
>> An entirely blue-sky guess as
>> to what your code might be doing to trigger such a problem is if you
>> were constantly replacing the same function's definition via CREATE OR
>> REPLACE FUNCTION.
> Do you mean that what would happen is that when we call the plpgsql
> function, it executes each time a create or replace, then execute the
> function ?
> because my functions are all written like that :
> -- Function: spzoneinsert(integer, integer)
>> CREATE OR REPLACE FUNCTION spzoneinsert(i_zoneid integer, i_output_port
>> integer)
>> RETURNS void AS
Well, yeah, that is the common way to define a function. The question
was about whether you are constantly re-executing this same SQL
thousands of times over the course of a session. I think it would take
actually using the function in between such redefinitions to provoke a
plan leak, but if you were doing that it might explain the problem.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, vincent@searidgetech.com
Subject: Re: out of memory error
In-Reply-To: <7269.1337717095@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox