md5_password_warnings
Read PG 18 manual ↗Controls whether a WARNING about MD5 password deprecation is produced when a CREATE ROLE or ALTER ROLE statement sets an MD5-encrypted password.
- Type
- bool
- Context
- user
- Measured default
- on
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Controls whether a WARNING about MD5 password deprecation is produced when a CREATE ROLE or ALTER ROLE statement sets an MD5-encrypted password. The default value is on.
Measured default history
| Version interval | Default |
|---|---|
| 18 – 19 | on |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
md5_password_warnings controls a PostgreSQL 18 deprecation WARNING emitted when CREATE ROLE or ALTER ROLE sets an MD5-encrypted password. It does not report authentication with an existing MD5 verifier and is therefore not an inventory of active MD5 clients or roles.
It is a USER-context setting, so an authorized role can change it for the current session and ALTER ROLE or ALTER DATABASE can establish future-session defaults. The warning can only arise in a session that both performs a password-setting statement and has the setting enabled.
password_encryption controls the format generated when plaintext passwords are set, while existing pg_authid verifiers remain unchanged until their passwords are reset. Migration therefore needs a protected verifier inventory, client compatibility testing, and credential rotation in addition to this warning.
Operational considerations
Assuming the warning fires when an existing MD5 verifier is used for authentication; it fires only when CREATE ROLE or ALTER ROLE sets one.
Using the absence of warnings as proof that the cluster has no MD5 secrets or MD5-only clients.
Disabling the warning in deployment sessions that create or rotate roles and thereby hiding new MD5 verifier creation.
Changing password_encryption without rotating existing role passwords, which leaves their stored verifier format unchanged.
Workload guidance
OLAP: Use the same rule for analytical roles: a silent legacy driver may continue authenticating with an old MD5 verifier without generating this warning, so test and rotate those credentials explicitly.
OLTP: Keep md5_password_warnings on, but treat each warning only as evidence that a password-setting statement created or supplied an MD5 verifier. Separately inventory existing verifier types and test every authentication path before enforcing SCRAM-only access.
SMALL: Leave the warning enabled; its cost is negligible. Do not mistake an empty warning stream for proof that no MD5 verifiers or MD5-only clients remain.
Version history 2
- PG 18 → 19changed
- PG 17 → 18added
Related entries
Further reading
Definition snapshot: english-manuals:50c5259ffd98bc1942e7dc68c50… · English manual source