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

From Alvaro Herrera
Subject Re: Allowing REINDEX to have an optional name
Date
Msg-id 202205311230.5dc4ztvncsck@alvherre.pgsql
Whole thread Raw
In response to Re: Allowing REINDEX to have an optional name  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Allowing REINDEX to have an optional name
List pgsql-hackers
On 2022-May-31, Michael Paquier wrote:

> The case with CONCURRENTLY is different though: the option will never
> work on system catalogs so we have to skip them.  Echoing with others
> on this thread, I don't think that we should introduce a different
> behavior on what's basically the same grammar.  That's just going to
> lead to more confusion.  So REINDEX DATABASE with or without a
> database name appended to it should always mean to reindex the
> catalogs on top of the existing relations.

I was thinking the opposite: REINDEX DATABASE with or without a database
name should always process the user relations and skip system catalogs.
If the user wants to do both, then they can use REINDEX SYSTEM in
addition.

The reason for doing it like this is that there is no way to process
only user tables and skip catalogs.  So this is better for
composability.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Most hackers will be perfectly comfortable conceptualizing users as entropy
 sources, so let's move on."                               (Nathaniel Smith)



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: "ERROR: latch already owned" on gharial
Next
From: Robert Haas
Date:
Subject: Re: doc: CREATE FOREIGN TABLE .. PARTITION OF .. DEFAULT