From: Tom Lane <tgl@sss.pgh.pa.us>
To: will.pearson@digital.cabinet-office.gov.uk
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
Date: Fri, 28 Oct 2016 14:34:34 -0400
Message-ID: <7727.1477679674@sss.pgh.pa.us> (raw)
In-Reply-To: <20161028162317.15991.74004@wrigleys.postgresql.org>
References: <20161028162317.15991.74004@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
will.pearson@digital.cabinet-office.gov.uk writes:
> [ lots-n-lots-of CREATE FUNCTION/execute function/DROP FUNCTION eat memory ]
I think probably what's going on here is that plpgsql is creating cache
entries for these functions on first execution, and not reclaiming them
before end of session.
I'm not terribly excited about adding overhead to make it keep track of
DROP FUNCTION operations, because this coding style seems less than great
anyway. Have you considered using DO blocks instead of short-lived
functions?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, will.pearson@digital.cabinet-office.gov.uk
Subject: Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
In-Reply-To: <7727.1477679674@sss.pgh.pa.us>
References: <20161028162317.15991.74004@wrigleys.postgresql.org> <7727.1477679674@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