mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Issue a warning during the creation of hash indexes
This commit is contained in:
@ -489,6 +489,10 @@ DefineIndex(Oid relationId,
|
||||
accessMethodId = HeapTupleGetOid(tuple);
|
||||
accessMethodForm = (Form_pg_am) GETSTRUCT(tuple);
|
||||
|
||||
if (strcmp(accessMethodName, "hash") == 0)
|
||||
ereport(WARNING,
|
||||
(errmsg("hash indexes are not WAL-logged so they are not crash-safe and cannot be used on streaming standbys")));
|
||||
|
||||
if (stmt->unique && !accessMethodForm->amcanunique)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
|
Reference in New Issue
Block a user