On Thu, Nov 30, 2017 at 7:02 AM, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: > Great question. So you're thinking that the planner might have an > interest in knowing what indexes are defined at the parent table level > for planning purposes; but for that to actually have any effect we would > need to change the planner and executor also. And one more point, also > related to something you said before: we currently (I mean after my > patch) don't mark partitioned-table-level indexes as valid or not valid > depending on whether all its children exist, so trying to use that in > the planner without having a flag could cause invalid plans to be > generated (i.e. ones that would cause nonexistent indexes to be > referenced).
Did you do it this way due to locking concerns? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company