> It means I can connect with this user to the database. The issue is, when the valid until timestamp comes… the new logins are not blocked.
What is the `authentication method` used in the pg_hba.conf for this `test_user` ?
Note , if the authentication method is `trust` even though the password expires the login is not blocked but if it is a `password`(or any other type which verifies password) then it will throw error like below
FATAL: password authentication failed for user "test_user"
If we check the server log it will show below log snippet
"FATAL","28P01","password authentication failed for user ""test_user""","User ""test_user"" has an expired password.
The VALID UNTIL clause applies only to the current password and is enforced only if the authentication method uses it. Once the validity period expires, authentication will fail with an error.
Also, please double-check that the timezone used when creating the role matches the system's configured timezone.
Please share the authentication method you've configured in your pg_hba.conf file so we can assist you more effectively.
For more information on supported authentication type please check the reference guide.
-------------------------------------------