Re: Add --tablespace option to reindexdb

Mark Dilger <mark.dilger@enterprisedb.com>

From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-01T17:26:03Z
Lists: pgsql-hackers

> On Feb 25, 2021, at 10:49 PM, Michael Paquier <michael@paquier.xyz> wrote:
> 
> Hi all,

Hi Michael,

> Since c5b2860, it is possible to specify a tablespace for a REINDEX,
> but the equivalent option has not been added to reindexdb.  Attached
> is a patch to take care of that.
> 
> This includes documentation and tests.

The documentation of the TABLESPACE option for REINDEX says:

+      Specifies that indexes will be rebuilt on a new tablespace.

but in your patch for reindexdb, it is less clear:

+        Specifies the tablespace to reindex on. (This name is processed as
+        a double-quoted identifier.)

I think the language "to reindex on" could lead users to think that indexes already existent in the given tablespace will be reindexed.  In other words, the option might be misconstrued as a way to specify all the indexes you want reindexed.  Whatever you do here, beware that you are using similar language in the --help, so consider changing that, too.


—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






Commits

  1. Add --tablespace option to reindexdb

  2. Fix duplicated test case in TAP tests of reindexdb