From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix plpgsql to release SPI plans when a function or DO block is |
Date: | 2011-03-27 16:51:13 |
Message-ID: | E1Q3tBJ-0007UC-VU@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Fix plpgsql to release SPI plans when a function or DO block is freed.
This fixes the gripe I made a few months ago about DO blocks getting
slower with repeated use. At least, it fixes it for the case where
the DO block isn't aborted by an error. We could try running
plpgsql_free_function_memory() even during error exit, but that seems
a bit scary since it makes a lot of presumptions about the data
structures being in good shape. It's probably reasonable to assume
that repeated failures of DO blocks isn't a performance-critical case.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/87f2ad1326bff5cd37dde6fbf024137a2243efea
Modified Files
--------------
src/pl/plpgsql/src/pl_comp.c | 7 +-
src/pl/plpgsql/src/pl_funcs.c | 398 +++++++++++++++++++++++++++++++++++++++
src/pl/plpgsql/src/pl_handler.c | 10 +
src/pl/plpgsql/src/plpgsql.h | 1 +
4 files changed, 411 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-03-27 17:30:11 | pgsql: Fix check_exclusion_constraint() to insert correct collations in |
Previous Message | Robert Haas | 2011-03-27 01:19:27 | pgsql: Remove disclaimer stating that fsync=off slows down sync rep. |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2011-03-27 16:52:03 | Re: WIP: Allow SQL-language functions to reference parameters by parameter name |
Previous Message | Gurjeet Singh | 2011-03-27 16:50:10 | Re: Needs Suggestion |