]> granicus.if.org Git - postgresql/commitdiff
Document how to identify an invalid index after a failed CREATE INDEX
authorBruce Momjian <bruce@momjian.us>
Tue, 3 Apr 2007 22:38:35 +0000 (22:38 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 3 Apr 2007 22:38:35 +0000 (22:38 +0000)
CONCURRENTLY.

Gregory Stark

doc/src/sgml/ref/create_index.sgml

index db873c720774e0955ffac8871b9c28e7c76ba408..69ba5d7a7a578a90e01bcd6a4287ab8fb9efcc58 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.60 2007/01/31 23:26:03 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.61 2007/04/03 22:38:35 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -332,7 +332,20 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] <replaceable class="parameter">name</re
     uniqueness violation in a unique index, the <command>CREATE INDEX</>
     command will fail but leave behind an <quote>invalid</> index. This index
     will be ignored for querying purposes because it might be incomplete;
-    however it will still consume update overhead.  The recommended recovery
+    however it will still consume update overhead. The <application>psql</>
+    <command>\d</> command will mark such an index as <literal>INVALID</>:
+
+<programlisting>
+postgres=# \d tab
+       Table "public.tab"
+ Column |  Type   | Modifiers 
+--------+---------+-----------
+ col    | integer | 
+Indexes:
+    "idx" btree (col) INVALID
+</programlisting>
+
+    The recommended recovery
     method in such cases is to drop the index and try again to perform
     <command>CREATE INDEX CONCURRENTLY</>.  (Another possibility is to rebuild
     the index with <command>REINDEX</>.  However, since <command>REINDEX</>