summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-10-17 08:27:27 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2012-10-17 08:27:27 +0100
commit3877b1fa17fc9003691d890cec5557c64db05462 (patch)
tree2b8fd012aaee013f23cd2c35ce7d5fcefc5a1055
parent288367427472f3d300c51ff9941eb486cfc01c6a (diff)
Clarify hash index caution and copy to CREATE INDEX docs
-rw-r--r--doc/src/sgml/indices.sgml6
-rw-r--r--doc/src/sgml/ref/create_index.sgml12
2 files changed, 16 insertions, 2 deletions
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 2dedb153c06..c7c3211f1f1 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -196,8 +196,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>
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 5d0ea4372fc..8f266ed6d00 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -451,6 +451,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.