Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
Date
Msg-id 7727.1477679674@sss.pgh.pa.us
Whole thread Raw
In response to BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion  (will.pearson@digital.cabinet-office.gov.uk)
Responses Re: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
List pgsql-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

pgsql-bugs by date:

Previous
From: will.pearson@digital.cabinet-office.gov.uk
Date:
Subject: BUG #14403: Large numbers of CREATE OR UPDATE function causes memory exhaustion
Next
From: clinton.adams@gmail.com
Date:
Subject: BUG #14404: High row estimates when query uses master inherited tables