Re: Allowing REINDEX to have an optional name - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Allowing REINDEX to have an optional name
Date
Msg-id YntMwnOOZF9UELKK@paquier.xyz
Whole thread Raw
In response to Re: Allowing REINDEX to have an optional name  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: Allowing REINDEX to have an optional name
List pgsql-hackers
On Wed, May 11, 2022 at 09:54:17AM +0530, Ashutosh Bapat wrote:
> REINDEX DATABASE <database name> does system catalogs as well
> REINDEX DATABASE does everything except system catalogs
>
> That's confusing and unintuitive.

Agreed.  Nobody is going to remember the difference.  REINDEX's
parsing grammar is designed to be extensible because we have the
parenthesized flavor.  Why don't you add an option there to skip the
catalogs, like a SKIP_CATALOG?

> Not providing the database name leads to ignoring system catalogs. I won't
> expect that from this syntax.

I don't disagree with having a shortened grammar where the database
name is not required because one cannot reindex a database different
than the one connected to, but changing a behavior based on such a
grammar difference is not a good user experience.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Estimating HugePages Requirements?
Next
From: Thomas Munro
Date:
Subject: Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To: