You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation on POSTGRES_HOST_AUTH_METHOD says that specifying a value for the POSTGRES_HOST_AUTH_METHOD env var will add a host all all all $POSTGRES_HOST_AUTH_METHOD line to the pg_hba.conf file in the container. It also says, "If unspecified then scram-sha-256 password authentication is used (in 14+; md5 in older releases)."
Neither of these things happen in a newly-created 14.4 container. If I don't specify it, I don't get the expected host all all all scram-sha-256 line in the /var/lib/postgresql/data/pg_hba.conf file in the container, nor do I if I specify -e POSTGRES_HOST_AUTH_METHOD=scram-sha-256 in my docker run ... command. And I can't connect from another host (with the error that the host doesn't have an entry in pg_hba.conf).
UPDATE: Actually specifying it does work if its a newly-created pg_hba.conf. I had it in a volume so it wasn't modifying an existing file, which seems reasonable.
Am I misunderstanding something here?
The text was updated successfully, but these errors were encountered:
UPDATE: Actually specifying it does work if its a newly-created pg_hba.conf. I had it in a volume so it wasn't modifying an existing file, which seems reasonable.
Correct, it only appends to pg_hba.conf when it is a newly initialized database.
The documentation on POSTGRES_HOST_AUTH_METHOD says that specifying a value for the POSTGRES_HOST_AUTH_METHOD env var will add a
host all all all $POSTGRES_HOST_AUTH_METHOD
line to thepg_hba.conf
file in the container. It also says, "If unspecified then scram-sha-256 password authentication is used (in 14+; md5 in older releases)."Neither of these things happen in a newly-created 14.4 container. If I don't specify it, I don't get the expected
host all all all scram-sha-256
line in the/var/lib/postgresql/data/pg_hba.conf
file in the container,nor do I if I specifyAnd I can't connect from another host (with the error that the host doesn't have an entry in-e POSTGRES_HOST_AUTH_METHOD=scram-sha-256
in mydocker run ...
command.pg_hba.conf
).UPDATE: Actually specifying it does work if its a newly-created
pg_hba.conf
. I had it in a volume so it wasn't modifying an existing file, which seems reasonable.Am I misunderstanding something here?
The text was updated successfully, but these errors were encountered: