Re: Recursive calls to functions that return sets

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Recursive calls to functions that return sets
Дата
Msg-id 20001.1143063561@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Recursive calls to functions that return sets  (Thomas Hallgren <thomas@tada.se>)
Список pgsql-hackers
Thomas Hallgren <thomas@tada.se> writes:
> But if I, during the SPI_IS_FIRST_CALL phase, do an SPI_connect 
> (done when the 'multi_call_memory_ctx' is current), then the leak seem 
> to occur immediately. Will that connect somehow alter the durability for 
> the context that is current on each call to my SRF?

Are you remembering to SPI_finish when you're done?  Maybe what you are
leaking is the SPI state information.

You could look at the MemoryContextStats printout for clues --- easiest
way is to deliberately run the backend out of memory, and after the "out
of memory" error occurs, look in the postmaster log.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Accessing schema data in information schema
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Accessing schema data in information schema