From: Simon Riggs <simon@2ndQuadrant.com> Date: Wed, 17 Oct 2012 07:33:38 +0000 (+0100) Subject: Clarify hash index caution and copy to CREATE INDEX docs X-Git-Tag: REL9_0_11~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98188441972151995d485b2e2c18a8cf36a3a227;p=postgresql Clarify hash index caution and copy to CREATE INDEX docs --- diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 1b02f5f563..9e090af0a0 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -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> diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index 5f23316c78..06bd06ba7c 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -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.