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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to