1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

REINDEX SCHEMA

Add new SCHEMA option to REINDEX and reindexdb.

Sawada Masahiko

Reviewed by Michael Paquier and Fabrízio de Royes Mello
This commit is contained in:
Simon Riggs
2014-12-09 00:28:00 +09:00
parent 8001fe67a3
commit fe263d115a
12 changed files with 253 additions and 61 deletions

View File

@ -21,7 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
REINDEX { INDEX | TABLE | DATABASE | SYSTEM } <replaceable class="PARAMETER">name</replaceable> [ FORCE ]
REINDEX { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replaceable class="PARAMETER">name</replaceable> [ FORCE ]
</synopsis>
</refsynopsisdiv>
@ -100,6 +100,19 @@ REINDEX { INDEX | TABLE | DATABASE | SYSTEM } <replaceable class="PARAMETER">nam
</listitem>
</varlistentry>
<varlistentry>
<term><literal>SCHEMA</literal></term>
<listitem>
<para>
Recreate all indexes of the specified schema. If a table of this
schema has a secondary <quote>TOAST</> table, that is reindexed as
well. Indexes on shared system catalogs are also processed.
This form of <command>REINDEX</command> cannot be executed inside a
transaction block.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>DATABASE</literal></term>
<listitem>

View File

@ -24,6 +24,16 @@ PostgreSQL documentation
<command>reindexdb</command>
<arg rep="repeat"><replaceable>connection-option</replaceable></arg>
<arg choice="plain" rep="repeat">
<arg choice="opt">
<group choice="plain">
<arg choice="plain"><option>--schema</option></arg>
<arg choice="plain"><option>-S</option></arg>
</group>
<replaceable>table</replaceable>
</arg>
</arg>
<arg choice="plain" rep="repeat">
<arg choice="opt">
<group choice="plain">
@ -161,6 +171,18 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>-S <replaceable class="parameter">schema</replaceable></></term>
<term><option>--schema=<replaceable class="parameter">schema</replaceable></></term>
<listitem>
<para>
Reindex <replaceable class="parameter">schema</replaceable> only.
Multiple schemas can be reindexed by writing multiple
<option>-S</> switches.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t <replaceable class="parameter">table</replaceable></></term>
<term><option>--table=<replaceable class="parameter">table</replaceable></></term>