authentication. My connections matches the wrong pg_hba line.
I get this error :
"password authentication failed for user ""user1""","User ""user1"" has no password assigned.
Connection matched pg_hba.conf line 104: ""host all all 0.0.0.0/0 scram-sha-256""
The patronictl pg_hba line I want is:
- host all yr505039 0.0.0.0/0 ldap ldapserver=....
Is it okay to manually edit my pg_hba files in postgresql?
As it has to be replicated to the other instances, you have to do it with Patroni: patronictl edit-config
Thank you for your answer, Yes I used patronictl edit-config. I also reloaded and restarted the cluster, but when I look at the logs, the connection still does not match the pg_hba LDAP line. It matches the line "host all all 0.0.0.0/0 scram-sha-256". It seems like I can't commit my patronictl edit-config pg_hba changes.
Ants has posted an answer with examples for how to do it on stackoverflow: https://stackoverflow.com/questions/57570581/can-you-change-pg-hba-conf-using-patronictl#57572258
And I forgot to mention, that Patroni handles reload and restart (if necessary) itself. There is no need to do this manually.
If I unterstood correctly, When I change pg_hba lines with patronictl edit-config, my local pg_hba files must change Automaticly. But it didnt changed. So first, I have to find the reason for this.
It takes some time until the files are changed, it's not immediately.
Обсуждают сегодня