Re: read-only planner input - Mailing list pgsql-hackers

From Neil Conway
Subject Re: read-only planner input
Date
Msg-id 423A695B.9010508@samurai.com
Whole thread Raw
In response to read-only planner input  (Neil Conway <neilc@samurai.com>)
Responses Re: read-only planner input
List pgsql-hackers
Neil Conway wrote:
> (b) should be pretty easy to solve; we can create a per-Query PlanState 
> struct that contains this information, as well as holding a pointer to 
> the Query (and perhaps the in-construct Plan tree).

I just noticed that there is a `PlanState' node in the executor, of all 
places. I'm thinking of using `QueryState' instead -- this parallels the 
usage of PlanState in the executor, to some degree (PlanState holds some 
of the state of the executor as it examines a Plan; QueryState holds 
some of the state of the planner as it examines a Query). I also 
considered `PlannerState', but that doesn't seem best, as there can be 
multiple instances of this struct in existence for a single invocation 
of planner() (due to subqueries).

I also created a new header file, `plan_internals.h' for the declaration 
of this struct, and moved a few planner-internal declarations from 
planner.h to plan_internals.h -- I think it would be best to only define 
external interfaces in planner.h

-Neil


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query crashes/hangs server
Next
From: "Qingqing Zhou"
Date:
Subject: Re: read-only planner input