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

From Tom Lane
Subject Re: read-only planner input
Date
Msg-id 7960.1111340147@sss.pgh.pa.us
Whole thread Raw
In response to Re: read-only planner input  (Neil Conway <neilc@samurai.com>)
Responses Re: read-only planner input  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> I've got most of this finished; I'll post a patch soon. One issue I ran 
> into is how to handle query_tree_mutator() and query_tree_walker(): they 
> both expect to be able to traverse a Query's in_info_list, which my 
> patch moves into the QueryState struct. If maintaining this property is 
> essential, it seems that we'll need a way to get the QueryState 
> associated with a given Query.

whereupon the entire premise of a read-only tree collapses ...

That's a bit nasty.  I'm fairly sure that I added in_info_list to the
walker recursion because I had to; I don't recall the exact scenario,
but I think it needs to be possible to reassign relation numbers
within that data structure if we are doing it elsewhere in a query
tree.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Avoiding unnecessary writes during relation drop and truncate
Next
From: Tom Lane
Date:
Subject: Re: GUC variable for setting number of local buffers