From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Progress report: intraquery memory recovery in executor |
Date: | 2000-07-10 14:30:31 |
Message-ID: | 3.0.5.32.20000711003031.0251a300@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 10:08 10/07/00 -0400, Tom Lane wrote:
>Philip Warner <pjw(at)rhyme(dot)com(dot)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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-10 14:32:42 | Re: more corruption |
Previous Message | Tom Lane | 2000-07-10 14:29:40 | Re: Re: [GENERAL] PostgreSQL vs. MySQL |