On 2019-May-27, Michael Paquier wrote: > On Wed, May 15, 2019 at 11:17:51AM +0900, Michael Paquier wrote: > > Perhaps something like the attached for the REINDEX portion would make > > the world a better place? What do you think? > > Alvaro, do you have extra thoughts about this patch improving the > error message consistency for REINDEX CONCURRENTLY. I quite like the > suggestions you made and this makes the error strings more > project-like, so I would like to apply it.
I wonder if we really want to abolish all distinction between "cannot do X" and "Y is not supported". I take the former to mean that the operation is impossible to do for some reason, while the latter means we just haven't implemented it yet and it seems likely to get implemented in a reasonable timeframe. See some excellent commentary about about the "can not" wording at https://postgr.es/m/CA+TgmoYS8jKhETyhGYTYMcbvGPwYY=qa6yyp9b47mx7mwee...@mail.gmail.com I notice your patch changes "catalog relations" to "system catalogs". I think we predominantly prefer the latter, so that part of your change seems OK. (In passing, I noticed we have a couple of places using "system catalog tables", which is weird.) I think reindexing system catalogs concurrently is a complex enough undertaking that implementing it is far enough in the future that the "cannot" wording is okay; but reindexing partitioned tables is not so obviously out of the question. We do have "is not yet implemented" in a couple of other places, so all things considered I'm not so sure about changing that one to "cannot". -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services