Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda9ec32

Browse files
committed
Revise REINDEX CONCURRENTLY recovery instructions
When the leftover invalid index is "ccold", there's no need to re-runthe 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
1 parent814a570 commitda9ec32

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

‎doc/src/sgml/ref/reindex.sgml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURR
304304
<orderedlist>
305305
<listitem>
306306
<para>
307-
A newtemporary index definition is added to the catalog
307+
A newtransient index definition is added to the catalog
308308
<literal>pg_index</literal>. This definition will be used to replace
309309
the old index. A <literal>SHARE UPDATE EXCLUSIVE</literal> lock at
310310
session level is taken on the indexes being reindexed as well as their
@@ -380,13 +380,15 @@ Indexes:
380380
"idx_ccnew" btree (col) INVALID
381381
</programlisting>
382382

383-
The recommended recovery method in such cases is to drop the invalid index
384-
and try again to perform <command>REINDEX CONCURRENTLY</command>. The
385-
concurrent index created during the processing has a name ending in the
386-
suffix <literal>ccnew</literal>, or <literal>ccold</literal> if it is an
387-
old index definition which we failed to drop. Invalid indexes can be
388-
dropped using <literal>DROP INDEX</literal>, including invalid toast
389-
indexes.
383+
If the index marked <literal>INVALID</literal> is suffixed
384+
<literal>ccnew</literal>, then it corresponds to the transient
385+
index created during the concurrent operation, and the recommended
386+
recovery method is to drop it using <literal>DROP INDEX</literal>,
387+
then attempt <command>REINDEX CONCURRENTLY</command> again.
388+
If the invalid index is instead suffixed <literal>ccold</literal>,
389+
it corresponds to the original index which could not be dropped;
390+
the recommended recovery method is to just drop said index, since the
391+
rebuild proper has been successful.
390392
</para>
391393

392394
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp