Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb87671f

Browse files
committed
Shorten warning about hash creation
Also document that PITR is also affected.
1 parent417f924 commitb87671f

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

‎doc/src/sgml/ref/create_index.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ Indexes:
474474
Also, changes to hash indexes are not replicated over streaming or
475475
file-based replication after the initial base backup, so they
476476
give wrong answers to queries that subsequently use them.
477-
For these reasons, hash index use is presently discouraged.
477+
Hash indexes are also not properly restored during point-in-time
478+
recovery. For these reasons, hash index use is presently discouraged.
478479
</para>
479480
</caution>
480481

‎src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ DefineIndex(Oid relationId,
491491

492492
if (strcmp(accessMethodName,"hash")==0)
493493
ereport(WARNING,
494-
(errmsg("hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers")));
494+
(errmsg("hash indexes are not WAL-logged andtheir use is discouraged")));
495495

496496
if (stmt->unique&& !accessMethodForm->amcanunique)
497497
ereport(ERROR,

‎src/test/regress/expected/create_index.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,13 +2238,13 @@ DROP TABLE array_gin_test;
22382238
-- HASH
22392239
--
22402240
CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
2241-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
2241+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
22422242
CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops);
2243-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
2243+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
22442244
CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
2245-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
2245+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
22462246
CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
2247-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
2247+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
22482248
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
22492249
--
22502250
-- Test functional index

‎src/test/regress/expected/enum.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ DROP INDEX enumtest_btree;
383383
-- Hash index / opclass with the = operator
384384
--
385385
CREATE INDEX enumtest_hash ON enumtest USING hash (col);
386-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
386+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
387387
SELECT * FROM enumtest WHERE col = 'orange';
388388
col
389389
--------

‎src/test/regress/expected/macaddr.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SELECT * FROM macaddr_data;
3939

4040
CREATE INDEX macaddr_data_btree ON macaddr_data USING btree (b);
4141
CREATE INDEX macaddr_data_hash ON macaddr_data USING hash (b);
42-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
42+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
4343
SELECT a, b, trunc(b) FROM macaddr_data ORDER BY 2, 1;
4444
a | b | trunc
4545
----+-------------------+-------------------

‎src/test/regress/expected/replica_identity.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CREATE INDEX test_replica_identity_keyab ON test_replica_identity (keya, keyb);
1111
CREATE UNIQUE INDEX test_replica_identity_keyab_key ON test_replica_identity (keya, keyb);
1212
CREATE UNIQUE INDEX test_replica_identity_nonkey ON test_replica_identity (keya, nonkey);
1313
CREATE INDEX test_replica_identity_hash ON test_replica_identity USING hash (nonkey);
14-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
14+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
1515
CREATE UNIQUE INDEX test_replica_identity_expr ON test_replica_identity (keya, keyb, (3));
1616
CREATE UNIQUE INDEX test_replica_identity_partial ON test_replica_identity (keya, keyb) WHERE keyb != '3';
1717
-- default is 'd'/DEFAULT for user created tables

‎src/test/regress/expected/uuid.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ SELECT COUNT(*) FROM guid1 WHERE guid_field >= '22222222-2222-2222-2222-22222222
114114
-- btree and hash index creation test
115115
CREATE INDEX guid1_btree ON guid1 USING BTREE (guid_field);
116116
CREATE INDEX guid1_hash ON guid1 USING HASH (guid_field);
117-
WARNING: hash indexes are not WAL-logged andthus are not crash-safe and cannot be used on standby servers
117+
WARNING: hash indexes are not WAL-logged andtheir use is discouraged
118118
-- unique index test
119119
CREATE UNIQUE INDEX guid1_unique_BTREE ON guid1 USING BTREE (guid_field);
120120
-- should fail

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp