Re: Understanding the behaviour of hostname in psql
От | Tom Lane |
---|---|
Тема | Re: Understanding the behaviour of hostname in psql |
Дата | |
Msg-id | 26365.1291568591@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Understanding the behaviour of hostname in psql (Marco Craveiro <marco.craveiro@gmail.com>) |
Ответы |
Re: Understanding the behaviour of hostname in psql
|
Список | pgsql-novice |
Marco Craveiro <marco.craveiro@gmail.com> writes: > unfortunately, the result is still not quite right: > $ psql -h 127.0.0.1 -U marco -w --dbname sanzala > [ works as expected ] > $ psql -h localhost -U marco -w --dbname sanzala > psql: fe_sendauth: no password supplied It looks to me like "localhost" is getting resolved as the IPv6 loopback address (::1), which for some reason you've configured differently than the IPv4 loopback address in your pg_hba.conf: > host all all 127.0.0.1/32 trust > host all all ::1/128 md5 I'm not sure why your "ping" example doesn't reflect that --- maybe you have an IPv4-only version of ping? But if you're unconvinced you could turn on log_connections and see where the server sees the connection as coming from. regards, tom lane
В списке pgsql-novice по дате отправления: