Re: Patch for fixing a few memory leaks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch for fixing a few memory leaks
Дата
Msg-id 2671.1002235834@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch for fixing a few memory leaks  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Is there some sort of a system behind which places are subject to leaks
> and which places are just too lazy to call pfree()?

> I know that index support procedures must not leak, hmm, I guess this
> would include the function manager...

Yeah, that's basically why there's a problem here --- if this weren't
getting called from the index support area, I don't think the leak would
matter.

> Why aren't index support procedures called with an appropriate memory
> context set up?

I looked at recovering space after index operations but decided it would
take more work than I could invest at the time.  The trouble is that
several of the index AMs allocate space that they expect to stick around
across operations, so they'd have to be fixed to use a special context
for such things.  Eventually it'd be nice to fix it properly, ie, run
index support routines with CurrentMemoryContext = a short-term context,
just as you say.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Patch for fixing a few memory leaks
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Problem on AIX with current