pgsql: Eliminate memory leaks in plperl's spi_prepare() function.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Eliminate memory leaks in plperl's spi_prepare() function.
Дата
Msg-id E1UBcHm-00060Y-1J@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Eliminate memory leaks in plperl's spi_prepare() function.

Careless use of TopMemoryContext for I/O function data meant that repeated
use of spi_prepare and spi_freeplan would leak memory at the session level,
as per report from Christian Schröder.  In addition, spi_prepare
leaked a lot of transient data within the current plperl function's SPI
Proc context, which would be a problem for repeated use of spi_prepare
within a single plperl function call; and it wasn't terribly careful
about releasing permanent allocations in event of an error, either.

In passing, clean up some copy-and-pasteos in query-lookup error messages.

Alex Hunsaker and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a4d3a504e730c47ccee5082ee703082e42c8b5ce

Modified Files
--------------
src/pl/plperl/plperl.c |  116 ++++++++++++++++++++++++++++++------------------
1 files changed, 72 insertions(+), 44 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: Add CREATE RECURSIVE VIEW syntax
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Eliminate memory leaks in plperl's spi_prepare() function.