| From: | Joe Conway <mail(at)joeconway(dot)com> | 
|---|---|
| To: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Memory management question | 
| Date: | 2002-09-03 18:14:02 | 
| Message-ID: | 3D74FBEA.40105@joeconway.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Nigel J. Andrews wrote:
> 
> It's probably a pretty basic question explained in some document I haven't seen
> but...if I do something like a CreateTupleDescCopy() how do I know my memory
> context owns everything allocated without following the code all the way
> through until it returns to me?
I asked a related question recently. Here it is with Tom's response:
Tom Lane wrote:
 > Joe Conway wrote:
 >>Does a good primer on proper backend memory-context handling exist?
 >
 > The original design document is in src/backend/utils/mmgr/README;
 > somebody needs to recast that into present tense and put it into the
 > Developer's Guide SGML docs.
 >
 > If you read that and feel you understand it, next read
 > executor/nodeAgg.c and see if you follow the memory management
 > there...
 > AFAIR that's the most complex use of short-term contexts in the
 > system.
You might want to read through those to get a better understanding.
HTH,
Joe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Barry Lind | 2002-09-03 18:15:32 | Re: possible vacuum improvement? | 
| Previous Message | Rod Taylor | 2002-09-03 18:03:58 | 7.2.2 bug? |