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

Commitcd39718

Browse files
committed
Document how to identify an invalid index after a failed CREATE INDEX
CONCURRENTLY.Gregory Stark
1 parent9c9b619 commitcd39718

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

‎doc/src/sgml/ref/create_index.sgml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.60 2007/01/31 23:26:03 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.61 2007/04/03 22:38:35 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -332,7 +332,20 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] <replaceable class="parameter">name</re
332332
uniqueness violation in a unique index, the <command>CREATE INDEX</>
333333
command will fail but leave behind an <quote>invalid</> index. This index
334334
will be ignored for querying purposes because it might be incomplete;
335-
however it will still consume update overhead. The recommended recovery
335+
however it will still consume update overhead. The <application>psql</>
336+
<command>\d</> command will mark such an index as <literal>INVALID</>:
337+
338+
<programlisting>
339+
postgres=# \d tab
340+
Table "public.tab"
341+
Column | Type | Modifiers
342+
--------+---------+-----------
343+
col | integer |
344+
Indexes:
345+
"idx" btree (col) INVALID
346+
</programlisting>
347+
348+
The recommended recovery
336349
method in such cases is to drop the index and try again to perform
337350
<command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild
338351
the index with <command>REINDEX</>. However, since <command>REINDEX</>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp