Re: WIP: pl/pgsql cleanup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: pl/pgsql cleanup
Дата
Msg-id 27129.1107790885@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: pl/pgsql cleanup  (Neil Conway <neilc@samurai.com>)
Ответы Re: WIP: pl/pgsql cleanup  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> - abandonded the falloc() idea. There really aren't that many
> short-lived allocations in the PL/PgSQL compiler, and using falloc()
> made it difficult to use List. Instead, make the CurrentMemoryContext
> the long-lived function context, and explicitly pfree short-term
> allocations. Not _all_ short-lived allocations are explicitly released;
> if this turns out to be a problem, it can be cleaned up later.

My recollection is that I was not nearly as worried about short-term
pallocs in the plpgsql code itself, as about leakage in various main-
backend routines that get called incidentally during parsing.
backend/parser/ is quite cavalier about this as a whole, because it
expects to be called in contexts that are not long-lived.  Have you
done any checking to ensure that the per-function context doesn't get
unreasonably bloated this way?

            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Ameen - Etemady"
Дата:
Сообщение: Re: again: add collation support function
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: again: add collation support function