Skip to content

Commit cd39718

Browse files
committed
Document how to identify an invalid index after a failed CREATE INDEX
CONCURRENTLY. Gregory Stark
1 parent 9c9b619 commit cd39718

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy