I am trying to bring up a PG13 cluster via patroni along with "scram-sha-256" password_encryption. Besides, I have changed the default md5 to scram-sha-256 in pg_hba.conf as well. However, once patroni was trying to bring the instance up, it complained error like below:
psycopg2.OperationalError: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
And from postgresql log file:
2022-04-07 06:35:49.218 GMT [5212]: [2-1] db=[unknown], user=[unknown], app=[unknown], client=::1LOCATION: BackendInitialize, postmaster.c:4409
2022-04-07 06:35:49.229 GMT [5212]: [3-1] db=postgres, user=postgres, app=[unknown], client=::1FATAL: 28P01: password authentication failed for user "postgres"
2022-04-07 06:35:49.229 GMT [5212]: [4-1] db=postgres, user=postgres, app=[unknown], client=::1DETAIL: User "postgres" does not have a valid SCRAM secret.
Connection matched pg_hba.conf line 5: "host all all ::1/128 scram-sha-256"
2022-04-07 06:35:49.229 GMT [5212]: [5-1] db=postgres, user=postgres, app=[unknown], client=::1LOCATION: auth_failed, auth.c:334
May I know if there is anything I missed?