Skip to content

Commit 9f9695a

Browse files
Clarify hash index caution and copy to CREATE INDEX docs
1 parent 22cc3b3 commit 9f9695a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

doc/src/sgml/indices.sgml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
196196
<para>
197197
Hash index operations are not presently WAL-logged,
198198
so hash indexes might need to be rebuilt with <command>REINDEX</>
199-
after a database crash. They are also not replicated over streaming or
200-
file-based replication.
199+
after a database crash if there were unwritten changes.
200+
Also, changes to hash indexes are not replicated over streaming or
201+
file-based replication after the initial base backup, so they
202+
give wrong anwers to queries that subsequently use them.
201203
For these reasons, hash index use is presently discouraged.
202204
</para>
203205
</caution>

doc/src/sgml/ref/create_index.sgml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,18 @@ Indexes:
466466
they can be useful.
467467
</para>
468468

469+
<caution>
470+
<para>
471+
Hash index operations are not presently WAL-logged,
472+
so hash indexes might need to be rebuilt with <command>REINDEX</>
473+
after a database crash if there were unwritten changes.
474+
Also, changes to hash indexes are not replicated over streaming or
475+
file-based replication after the initial base backup, so they
476+
give wrong anwers to queries that subsequently use them.
477+
For these reasons, hash index use is presently discouraged.
478+
</para>
479+
</caution>
480+
469481
<para>
470482
Currently, only the B-tree, GiST and GIN index methods support
471483
multicolumn indexes. Up to 32 fields can be specified by default.

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