Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b87671f1
Commit
b87671f1
authored
Oct 18, 2014
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten warning about hash creation
Also document that PITR is also affected.
parent
417f9248
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
10 deletions
+11
-10
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_index.sgml
+2
-1
src/backend/commands/indexcmds.c
src/backend/commands/indexcmds.c
+1
-1
src/test/regress/expected/create_index.out
src/test/regress/expected/create_index.out
+4
-4
src/test/regress/expected/enum.out
src/test/regress/expected/enum.out
+1
-1
src/test/regress/expected/macaddr.out
src/test/regress/expected/macaddr.out
+1
-1
src/test/regress/expected/replica_identity.out
src/test/regress/expected/replica_identity.out
+1
-1
src/test/regress/expected/uuid.out
src/test/regress/expected/uuid.out
+1
-1
No files found.
doc/src/sgml/ref/create_index.sgml
View file @
b87671f1
...
...
@@ -474,7 +474,8 @@ Indexes:
Also, changes to hash indexes are not replicated over streaming or
file-based replication after the initial base backup, so they
give wrong answers to queries that subsequently use them.
For these reasons, hash index use is presently discouraged.
Hash indexes are also not properly restored during point-in-time
recovery. For these reasons, hash index use is presently discouraged.
</para>
</caution>
...
...
src/backend/commands/indexcmds.c
View file @
b87671f1
...
...
@@ -491,7 +491,7 @@ DefineIndex(Oid relationId,
if
(
strcmp
(
accessMethodName
,
"hash"
)
==
0
)
ereport
(
WARNING
,
(
errmsg
(
"hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
"
)));
(
errmsg
(
"hash indexes are not WAL-logged and th
eir use is discouraged
"
)));
if
(
stmt
->
unique
&&
!
accessMethodForm
->
amcanunique
)
ereport
(
ERROR
,
...
...
src/test/regress/expected/create_index.out
View file @
b87671f1
...
...
@@ -2238,13 +2238,13 @@ DROP TABLE array_gin_test;
-- HASH
--
CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
--
-- Test functional index
...
...
src/test/regress/expected/enum.out
View file @
b87671f1
...
...
@@ -383,7 +383,7 @@ DROP INDEX enumtest_btree;
-- Hash index / opclass with the = operator
--
CREATE INDEX enumtest_hash ON enumtest USING hash (col);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
SELECT * FROM enumtest WHERE col = 'orange';
col
--------
...
...
src/test/regress/expected/macaddr.out
View file @
b87671f1
...
...
@@ -39,7 +39,7 @@ SELECT * FROM macaddr_data;
CREATE INDEX macaddr_data_btree ON macaddr_data USING btree (b);
CREATE INDEX macaddr_data_hash ON macaddr_data USING hash (b);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
SELECT a, b, trunc(b) FROM macaddr_data ORDER BY 2, 1;
a | b | trunc
----+-------------------+-------------------
...
...
src/test/regress/expected/replica_identity.out
View file @
b87671f1
...
...
@@ -11,7 +11,7 @@ CREATE INDEX test_replica_identity_keyab ON test_replica_identity (keya, keyb);
CREATE UNIQUE INDEX test_replica_identity_keyab_key ON test_replica_identity (keya, keyb);
CREATE UNIQUE INDEX test_replica_identity_nonkey ON test_replica_identity (keya, nonkey);
CREATE INDEX test_replica_identity_hash ON test_replica_identity USING hash (nonkey);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
CREATE UNIQUE INDEX test_replica_identity_expr ON test_replica_identity (keya, keyb, (3));
CREATE UNIQUE INDEX test_replica_identity_partial ON test_replica_identity (keya, keyb) WHERE keyb != '3';
-- default is 'd'/DEFAULT for user created tables
...
...
src/test/regress/expected/uuid.out
View file @
b87671f1
...
...
@@ -114,7 +114,7 @@ SELECT COUNT(*) FROM guid1 WHERE guid_field >= '22222222-2222-2222-2222-22222222
-- btree and hash index creation test
CREATE INDEX guid1_btree ON guid1 USING BTREE (guid_field);
CREATE INDEX guid1_hash ON guid1 USING HASH (guid_field);
WARNING: hash indexes are not WAL-logged and th
us are not crash-safe and cannot be used on standby servers
WARNING: hash indexes are not WAL-logged and th
eir use is discouraged
-- unique index test
CREATE UNIQUE INDEX guid1_unique_BTREE ON guid1 USING BTREE (guid_field);
-- should fail
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment