Re: pgsql: Fix plpgsql to release SPI plans when a function or DO block is

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Fix plpgsql to release SPI plans when a function or DO block is
Дата
Msg-id 3496.1301318503@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Fix plpgsql to release SPI plans when a function or DO block is  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-committers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 27.03.2011 19:51, Tom Lane wrote:
>> Fix plpgsql to release SPI plans when a function or DO block is freed.

> I was quite surprised by the way you did this. Instead of adding all
> that code to traverse the PLpgSQL_stmt tree (that we'll have to remember
> to keep up-to-date), can't we just have a list of cached plans in
> PLpgSQL_function? As attached.

The code I added is a direct rip-off of the adjacent function tree
dumping code, which we've had no trouble keeping up-to-date.  (I checked
it as I went through, and it did not appear to be missing any cases.)
I'm unconvinced that adding a separate new mechanism to track the
function's SPI plans would be more easily maintainable or less prone to
oversights.  Also, what if we come up with another resource that has to
be explicitly released here?  The tree walk won't require additional
mechanism for that.

            regards, tom lane

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pgsql: Fix plpgsql to release SPI plans when a function or DO block is
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Get rid of links that don't work when building HISTORY.