1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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: https://postgr.es/m/YDiaDMnzLICqeukl@paquier.xyz
This commit is contained in:
Michael Paquier
2021-03-03 10:14:21 +09:00
parent 5b2f2af3d9
commit 57e6db706e
3 changed files with 163 additions and 37 deletions

View File

@ -237,6 +237,16 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>--tablespace=<replaceable class="parameter">tablespace</replaceable></option></term>
<listitem>
<para>
Specifies the tablespace where indexes are rebuilt. (This name is
processed as a double-quoted identifier.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>