CREATE SUBSCRIPTION not picking up .pgpass while psql does - Mailing list pgsql-general

From Kristjan Mustkivi
Subject CREATE SUBSCRIPTION not picking up .pgpass while psql does
Date
Msg-id CAOQPKattt3g2dEKqiC9qdp4bxAHWipVO5fWy0En8MT9aw5SKmA@mail.gmail.com
Whole thread Raw
Responses Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does
List pgsql-general
Hello,

I do not understand why CREATE SUBSCRIPTION does not pick up .pgpass
(when psql does):

root@pg.newtest:/# psql 'host=pg.oldtest port=5432 user=pg_replication
dbname=oldtest'
oldtest=# \q

root@pg.newtest:/# psql newtest postgres
newtest=# CREATE SUBSCRIPTION sub_pgupgrade CONNECTION
'host=pg.oldtest port=5432 user=pg_replication dbname=oldtest'
PUBLICATION pub_pgupgrade;
ERROR:  could not connect to the publisher: connection to server at
"pg.oldtest" (x.x.x.x), port 5432 failed: fe_sendauth: no password
supplied
newtest=#

oldtest is 11.15 (Debian 11.15-1.pgdg90+1)
newtest is 14.5 (Debian 14.5-1.pgdg110+1)

.pgpass is under /root (home inside the docker container) with 0600
permissions and owned by user "postgres". Even providing
passfile=/root/.pgpass in the connstring does not work.

.pgpass contains:
*:*:*:pg_replication:password

Any thoughts on how to debug much appreciated.

Best regards,
-- 
Kristjan Mustkivi

Email: kristjan.mustkivi@gmail.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Missing query plan for auto_explain.
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does