pgsql: Add --tablespace option to reindexdb

Started by Michael Paquierover 5 years ago1 messagescomitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Add --tablespace option to reindexdb

This option provides REINDEX (TABLESPACE) for reindexdb, applying the
tablespace value given by the caller to all the REINDEX queries
generated.

While on it, this commit adds some tests for REINDEX TABLESPACE, with
and without CONCURRENTLY, when run on toast indexes and tables. Such
operations are not allowed, and toast relation names are not stable
enough to be part of the main regression test suite (even if using a PL
function with a TRY/CATCH logic, as CONCURRENTLY could not be tested).

Author: Michael Paquier
Reviewed-by: Mark Dilger, Daniel Gustafsson
Discussion: /messages/by-id/YDiaDMnzLICqeukl@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/57e6db706e81fd2609fa385677e6ae72471822fe

Modified Files
--------------
doc/src/sgml/ref/reindexdb.sgml | 10 ++++
src/bin/scripts/reindexdb.c | 109 +++++++++++++++++++++++++------------
src/bin/scripts/t/090_reindexdb.pl | 81 ++++++++++++++++++++++++++-
3 files changed, 163 insertions(+), 37 deletions(-)