diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-08-20 13:49:04 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-08-20 13:49:04 -0400 |
commit | da9ec328dda9625725ae8210ad6e6599ab876206 (patch) | |
tree | ec458e7c873f96319c2b778e328cb49928022a3a /doc/src | |
parent | 814a57065ec97e44de58db61a16957ddd09938e8 (diff) | |
download | postgresql-da9ec328dda9625725ae8210ad6e6599ab876206.tar.gz postgresql-da9ec328dda9625725ae8210ad6e6599ab876206.zip |
Revise REINDEX CONCURRENTLY recovery instructions
When the leftover invalid index is "ccold", there's no need to re-run
the command. Reword the instructions to make that explicit.
Backpatch to 12, where REINDEX CONCURRENTLY appeared.
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://postgr.es/m/20200819211312.GA15497@alvherre.pgsql
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/reindex.sgml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index 0ef61255912..a8b9a57544b 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -304,7 +304,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURR <orderedlist> <listitem> <para> - A new temporary index definition is added to the catalog + A new transient index definition is added to the catalog <literal>pg_index</literal>. This definition will be used to replace the old index. A <literal>SHARE UPDATE EXCLUSIVE</literal> lock at session level is taken on the indexes being reindexed as well as their @@ -380,13 +380,15 @@ Indexes: "idx_ccnew" btree (col) INVALID </programlisting> - The recommended recovery method in such cases is to drop the invalid index - and try again to perform <command>REINDEX CONCURRENTLY</command>. The - concurrent index created during the processing has a name ending in the - suffix <literal>ccnew</literal>, or <literal>ccold</literal> if it is an - old index definition which we failed to drop. Invalid indexes can be - dropped using <literal>DROP INDEX</literal>, including invalid toast - indexes. + If the index marked <literal>INVALID</literal> is suffixed + <literal>ccnew</literal>, then it corresponds to the transient + index created during the concurrent operation, and the recommended + recovery method is to drop it using <literal>DROP INDEX</literal>, + then attempt <command>REINDEX CONCURRENTLY</command> again. + If the invalid index is instead suffixed <literal>ccold</literal>, + it corresponds to the original index which could not be dropped; + the recommended recovery method is to just drop said index, since the + rebuild proper has been successful. </para> <para> |