On Sun, May 26, 2019 at 6:43 PM Michael Paquier <michael@paquier.xyz> wrote:
As you mention for reindex_relation() no indexes <=> nothing to do, still let's not rely on that. Instead of making the error message specific to concurrent operations, I would suggest to change it to "table foo has no indexes to reindex". What do you think about the attached?
I think we will need to separate out the NOTICE message for concurrent and regular case.
For example this doesn't sound correct
WARNING: cannot reindex exclusion constraint index "public.circles_c_excl" concurrently, skipping
NOTICE: table "circles" has no indexes to reindex
As no indexes can't be reindexed *concurrently* but there are still indexes which can be reindexed, invalid indexes I think fall in same category.