From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bill Parker <wp02855@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Date: Sat, 18 Jul 2015 22:19:15 +0200
Message-ID: <20150718201915.GA2297@postgresql.org> (raw)
In-Reply-To: <20150718155421.GZ2301@postgresql.org>
References: <CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com>
<CAB7nPqRmXz2DymNd_BX8HkaRJuQCTUyhh2d5Zx+d0aHNvpTw0Q@mail.gmail.com>
<20150612194716.GQ133018@postgresql.org>
<4457.1434166911@sss.pgh.pa.us>
<CAB7nPqSE2vmAdrv0LWBKkM-uBntscU6vdRRhUmKTOwjLNhJ7Lg@mail.gmail.com>
<20150718155421.GZ2301@postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
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: alvherre@2ndquadrant.com, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, wp02855@gmail.com
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
In-Reply-To: <20150718201915.GA2297@postgresql.org>
References: <CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com> <CAB7nPqRmXz2DymNd_BX8HkaRJuQCTUyhh2d5Zx+d0aHNvpTw0Q@mail.gmail.com> <20150612194716.GQ133018@postgresql.org> <4457.1434166911@sss.pgh.pa.us> <CAB7nPqSE2vmAdrv0LWBKkM-uBntscU6vdRRhUmKTOwjLNhJ7Lg@mail.gmail.com> <20150718155421.GZ2301@postgresql.org> <20150718201915.GA2297@postgresql.org>
* 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