Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
От | Alvaro Herrera |
---|---|
Тема | Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x |
Дата | |
Msg-id | 20150718201915.GA2297@postgresql.org обсуждение исходный текст |
Ответ на | Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x (Bill Parker <wp02855@gmail.com>) |
Ответы |
Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
|
Список | 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
В списке pgsql-bugs по дате отправления: