Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: will(dot)pearson(at)digital(dot)cabinet-office(dot)gov(dot)uk
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
Date: 2016-10-28 18:34:34
Message-ID: 7727.1477679674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

will(dot)pearson(at)digital(dot)cabinet-office(dot)gov(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message clinton.adams 2016-10-28 20:04:12 BUG #14404: High row estimates when query uses master inherited tables
Previous Message will.pearson 2016-10-28 16:23:17 BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion