]> granicus.if.org Git - postgresql/commitdiff
Clarify hash index caution and copy to CREATE INDEX docs
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 17 Oct 2012 07:33:38 +0000 (08:33 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 17 Oct 2012 07:33:38 +0000 (08:33 +0100)
doc/src/sgml/indices.sgml
doc/src/sgml/ref/create_index.sgml

index 1b02f5f563543719dca13bc8c31657f2857f7491..9e090af0a0fe08a5672eba722f27a61733857ec5 100644 (file)
@@ -191,8 +191,10 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
    <para>
     Hash index operations are not presently WAL-logged,
     so hash indexes might need to be rebuilt with <command>REINDEX</>
-    after a database crash. They are also not replicated over streaming or
-    file-based replication.
+    after a database crash if there were unwritten changes.
+    Also, changes to hash indexes are not replicated over streaming or
+    file-based replication after the initial base backup, so they
+    give wrong anwers to queries that subsequently use them.
     For these reasons, hash index use is presently discouraged.
    </para>
   </caution>
index 5f23316c78dec402952a70e43cfe110cb01de08e..06bd06ba7c95206a0887c9fedce424db60971429 100644 (file)
@@ -439,6 +439,18 @@ Indexes:
    they can be useful.
   </para>
 
+  <caution>
+   <para>
+    Hash index operations are not presently WAL-logged,
+    so hash indexes might need to be rebuilt with <command>REINDEX</>
+    after a database crash if there were unwritten changes.
+    Also, changes to hash indexes are not replicated over streaming or
+    file-based replication after the initial base backup, so they
+    give wrong anwers to queries that subsequently use them.
+    For these reasons, hash index use is presently discouraged.
+   </para>
+  </caution>
+
   <para>
    Currently, only the B-tree, GiST and GIN index methods support
    multicolumn indexes. Up to 32 fields can be specified by default.