Re: [BUGS] Postgres bug (working with iserverd) - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [BUGS] Postgres bug (working with iserverd)
Date
Msg-id 006201c0dcfb$81f39460$4a79583f@sectorbase.com
Whole thread Raw
In response to Re: [BUGS] Postgres bug (working with iserverd)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] Postgres bug (working with iserverd)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> However, EvalPlanQual still leaks more memory than suits me ---
> auxiliary memory allocated by the plan nodes is not recovered.
> I think the correct way to implement it would be to create a new
> memory context for each level of EvalPlanQual execution and use
> that context as the "per-query context" for the sub-query.  The
> whole context (including the copied plan) would be freed at the
> end of the sub-query.  The notion of a stack of currently-unused
> epqstate nodes would go away.
> 
> This would mean a few more cycles per tuple to copy the plan tree over
> again each time, but I think that's pretty trivial compared to the plan
> startup/shutdown costs that we incur anyway.  Besides, I have hopes of
> making plan trees read-only whenever we do the fabled querytree
> redesign, so the cost will someday go away.

Isn't plan shutdown supposed to free memory? How subselects run queries
again and again? I wasn't in planner/executor areas for long time and
have no time to look there now -:(, so - just asking -:)

Vadim




pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: optimiser problem
Next
From: Bruce Momjian
Date:
Subject: Re: Re: bug in pgcrypto 0.3