[HACKERS] Usage of planner_ctx

2012-04-24 Thread Amit Kapila
PlannerInfo-planner_ctx is assigned with either MessageContext or
PortalHeapMemory depending on the flow from which planner is invoked.

My doubt is that during whole planning process till the Plan is stored in
PlannedStmt, all the memory is from CurrentMemoryContext which is same as
PlannerInfo-planner_ctx.

 

So what is the use of having  PlannerInfo-planner_ctx which only contains
CurrentMemoryContext?

 



Re: [HACKERS] Usage of planner_ctx

2012-04-24 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes:
 So what is the use of having  PlannerInfo-planner_ctx which only contains
 CurrentMemoryContext?

It might be clearer if you read up on the memory management in GEQO
planning mode.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers