Robert Haas wrote: > On Thu, Jan 4, 2018 at 11:44 AM, Peter Eisentraut > <peter.eisentr...@2ndquadrant.com> wrote: > > I'm not sure why this feature of automatically picking up matching > > indexes even exists. Is it for some specific workflows or upgrade > > scenarios? It's kind of a surprising feature in a way. > > It allows you to avoid building a new indexes unnecessarily when > attaching a partition.
Yeah -- this is important to reduce the duration of the DDL operation, since attaching a partition requires an access exclusive lock. Having to build the index at that point would make that feature pretty much useless for many use cases. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services