From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bill Parker <wp02855(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x |
Date: | 2015-07-18 20:19:15 |
Message-ID: | 20150718201915.GA2297@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Alvaro Herrera wrote:
> > Now, perhaps we could do more efforts with prodesc as well, see for
> > example compile_pltcl_function for pltcl and similarly for plperl.
> > Thoughts?
>
> Right. It would simplify the code: create a memory context child of
> TopTransactionContext, then compile the function, and if successful,
> then MemoryContextSetParent to some longer-lived context. When the
> function is invalidated, it's sufficient to delete the context and
> create a new one. Creating the context as child of
> TopTransactionContext allows you to avoid an explicit
> MemoryContextDelete() in the elog(ERROR) cases while compiling.
With some additional effort, we could get rid of perm_fmgr_info, at
least in pltcl. (That hack was introduced in a3ed622b63b and
7748e9e7e5a back in 2001 and we never actually fixed it ...)
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-07-18 22:48:36 | Re: BUG #12379: pgbench should hint to pgbench -i |
Previous Message | Tom Lane | 2015-07-18 16:45:36 | Re: BUG #13490: Segmentation fault on pg_stat_activity |