Add --tablespace option to reindexdb

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-26T06:49:48Z
Lists: pgsql-hackers

Attachments

Hi all,

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.

While on it, I have added tests for toast tables and indexes with a
tablespace move during a REINDEX.  Those operations fail, but it is
not possible to get that into the main regression test suite because
the error messages include the relation names so that's unstable.
Well, it would be possible to do that for the non-concurrent case
using a TRY/CATCH block in a custom function but that would not work
with CONCURRENTLY.  Anyway, I would rather group the whole set of
tests together, and using the --tablespace option introduced here
within a TAP test does the job.

This is added to the next commit fest.

Thanks,
--
Michael

Commits

  1. Add --tablespace option to reindexdb

  2. Fix duplicated test case in TAP tests of reindexdb