Re: Progress report: intraquery memory recovery in executor

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: Progress report: intraquery memory recovery in executor
Дата
Msg-id 3.0.5.32.20000711003031.0251a300@mail.rhyme.com.au
обсуждение исходный текст
Ответ на Re: Progress report: intraquery memory recovery in executor  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Progress report: intraquery memory recovery in executor  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 10:08 10/07/00 -0400, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>> Is it simple for the person writing the low level routines to choose
>> (easily) to allocate 'temporary' memory vs. 'permanent' memory?
>
>One of the main problems is that a low-level routine doesn't necessarily
>know which is appropriate --- the answer may vary depending on where it
>was called from.  
...
>That's why I wanted to do the management at the level of the Plan node
>executor routines, which are high-level enough that they have some clue
>what's going on.

ISTM (with, perhaps, no basis (ISTMWPNB?)) that when allocating memory
there are a couple of cases:

You want it to be available:

1. until the end of the current call
2. at least until the next call
3. until TX end
4. forever
...etc.

If there are still cases where the called routine can't tell what sort of
memory it wants, then my method won't work (and I'd be interested to know
what they are).

But if a relatively short list of allocation types can be created, then the
palloc replacement can be passed an extra parameter (the 'allocation
type'), and handle memory contexts appropriately.

Feel free to tell me if this is so way off the mark that there is no
purpose in pursuing the discussion...


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [GENERAL] PostgreSQL vs. MySQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: more corruption