On Sat, 25 May 2019 at 12:06, Ashwin Agrawal <aagra...@pivotal.io> wrote: > Seems might be just emit the NOTICE "table xxx has no index", if really no > index for concurrent and non-concurrent case, make it consistent, less > confusing and leave it there. Attaching the patch to just do that. Thoughts?
Would it not be better just to change the error message for the concurrent case so that it reads: "table \"%s\" has no indexes that can be concurrently reindexed" Otherwise, what you have now is still confusing for partitioned tables: postgres=# create table listp (a int primary key) partition by list(a); CREATE TABLE postgres=# REINDEX TABLE CONCURRENTLY listp; psql: WARNING: REINDEX of partitioned tables is not yet implemented, skipping "listp" psql: NOTICE: table "listp" has no indexes REINDEX Also, I think people probably will care more about the fact that nothing was done for that table rather than if the table happens to have no indexes. For the non-concurrently case, that just happened to be the same thing. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services