mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Don't warn about creating temporary or unlogged hash indexes.
Warning people that no WAL-logging will be done doesn't make sense in this case. Michael Paquier
This commit is contained in:
@ -490,7 +490,8 @@ DefineIndex(Oid relationId,
|
||||
accessMethodId = HeapTupleGetOid(tuple);
|
||||
accessMethodForm = (Form_pg_am) GETSTRUCT(tuple);
|
||||
|
||||
if (strcmp(accessMethodName, "hash") == 0)
|
||||
if (strcmp(accessMethodName, "hash") == 0 &&
|
||||
RelationNeedsWAL(rel))
|
||||
ereport(WARNING,
|
||||
(errmsg("hash indexes are not WAL-logged and their use is discouraged")));
|
||||
|
||||
|
Reference in New Issue
Block a user