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

Commit0784c33

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 parent1fe1f42 commit0784c33

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
@@ -307,7 +307,7 @@ REINDEX [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] { IN
307307
<orderedlist>
308308
<listitem>
309309
<para>
310-
A newtemporary index definition is added to the catalog
310+
A newtransient index definition is added to the catalog
311311
<literal>pg_index</literal>. This definition will be used to replace
312312
the old index. A <literal>SHARE UPDATE EXCLUSIVE</literal> lock at
313313
session level is taken on the indexes being reindexed as well as their
@@ -383,13 +383,15 @@ Indexes:
383383
"idx_ccnew" btree (col) INVALID
384384
</programlisting>
385385

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

395397
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp