Re: Add --tablespace option to reindexdb

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add --tablespace option to reindexdb
Date: 2021-03-01 17:26:03
Message-ID: CA9CFD01-82B1-47F8-899A-9D3A3BFE6777@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Feb 25, 2021, at 10:49 PM, Michael Paquier <michael(at)paquier(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-03-01 17:38:18 [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]
Previous Message Alejandro Sánchez 2021-03-01 17:18:07 Re: Improvements in prepared statements