dblink authentication issue

Поиск
Список
Период
Сортировка
От Daulat
Тема dblink authentication issue
Дата
Msg-id CALfOM6+5-S_u_DC4uq74c1n-nfhK-6p_fmEhHTdHH+p6W2aH7g@mail.gmail.com
обсуждение исходный текст
Ответы Re: dblink authentication issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hello,

I have some problem with using dblink_connect_u() while making a connection using a .pgpass file. 


select * from gis.dblink_connect_u('conn'||'X123','dbname='||'pgdb');
ERROR:  could not establish connection
DETAIL:  fe_sendauth: no password supplied


The .pgpass file is under postgres user home (home/postgres/.pgpass) and has 0600 permission and postgres group. 


I am able to connect with the ./pgpass file without using a user password.


:/opt/PostgreSQL-14/bin$ ./psql -d postgres -U postgres
psql (14.6)
Type "help" for help.

postgres=#


pg_hba.conf have the following entry:


host    all             all                    127.0.0.1/32        md5


.pgpass have :


*:5432:*:postgres:2WSX#E86qrfv


I tried with the below (localhost and 127.0.0.1 and  IP) also but no success.
localhost:5432:*:postgres:2WSX#E86qrfv

127..0.0.1:5432:*:postgres:2WSX#E86qrfv

110.24.30.100:5432:*:postgres:2WSX#E86qrfv


When I provide the password in the connection string, there is no problem, but when I don’t, it says:


select * from gis.dblink_connect_u('conn'||'X123','dbname='||'gisdb');
ERROR:  could not establish connection
DETAIL:  fe_sendauth: no password supplied


My Postgres server is running on Ubuntu, version 18.04.1 with PostgreSQL 14.6




Thanks,





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

Предыдущее
От: Benjamin Acquaye
Дата:
Сообщение: Re: Unable to upgrade from 12.7 to 15.2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: dblink authentication issue