On Wed, 27 Mar 2019 at 18:39, Amit Langote <langote_amit...@lab.ntt.co.jp> wrote: > > On 2019/03/27 14:26, David Rowley wrote: > > Perhaps the way to make this work, at least in the long term is to do > > in the planner what we did in the executor in d73f4c74dd34. > > Maybe you meant 9ddef36278a9?
Probably. > What would be nice is being able to readily access Relation pointers of > all tables accessed in a query from anywhere in the planner, whereby, a > given table is opened only once. Well, yeah, that's what the commit did for the executor, so it is what I was trying to get at. > Note that Tom complained upthread that the patch is introducing > table_open()'s at random points within the planner, which is something to > avoid. Yip. :) hence my suggestion. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services