Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4

Поиск
Список
Период
Сортировка
От David Hillman
Тема Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4
Дата
Msg-id e06bb190-7afb-9002-2333-ff3b8ef4e153@kapitaltrading.com
обсуждение исходный текст
Ответ на Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On 10/27/21 7:17 PM, Tom Lane wrote:

> Notice it says "peer authentication", not "password authentication".
> So the password was never asked for, and the problem is that you're
> not logged in as "valid_user" (rather, it looks like, as "root").

This is still a bug, since per your description, the -U flag doesn't 
work correctly -- or is meaningless.  And, the -U flag works differently 
depending on which other flags are set ( -h in his case ), as my example 
does show, and that's not documented anywhere, as far as I know.


> This is evidently going to a different pg_hba.conf line, which
> might or might not be selecting password auth --- we can't see it.

There exist no such lines which pertain to "valid_user" here.

Furthermore, if I remove .pgpass, this case's result changes.

root@dbserver:~# cat ~/.pgpass
cat: /root/.pgpass: No such file or directory
root@dbserver:~# psql -d postgres -U valid_user -h localhost
Password for user valid_user:

Clearly, .pgpass is being utilized in the second example, and not in the 
first, contrary to the apparent intent and the documentation.

-- 
David Hillman
david@kapitaltrading.com




В списке pgsql-bugs по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: conchuela timeouts since 2021-10-09 system upgrade