On Fri, 2020-09-04 at 10:41 -0400, Alvaro Herrera wrote:
> > The value I see in this is:
> > - replacing a primary key index
> > - replacing the index behind a constraint targeted by a foreign key
>
> But why is this better than using REINDEX CONCURRENTLY?
It is not better, but it can be used to replace a constraint index
with an index with a different INCLUDE clause, which is something
that cannot easily be done otherwise.
For exclusion constraints it is pretty useless, and for unique
constraints it can be worked around with CREATE UNIQUE INDEX CONCURRENTLY.
Admitted, the use case is pretty narrow, and I am not sure if it is
worth adding code and SQL syntax for that.
Yours,
Laurenz Albe