From: | "Dan Mahoney (Gushi)" <postgres(at)gushi(dot)org> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | pgpass file in postresql.auto.conf? |
Date: | 2025-09-26 12:05:58 |
Message-ID: | 31ded2b6-d8f8-497c-59ea-c7885b4a7d26@gushi.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey folks,
In the interest of automation, I've set up a pgpass file for my
pg_basebackup between master and standby. This all works, thusly:
pg_basebackup -d
'postgres://repuser(at)10(dot)1(dot)1(dot)1:5432/foo?sslmode=verify-ca' -F p
--wal-method=stream -P -R -D /var/db/postgres/data17-test3
However, instead of the password getting baked into the pgsql.auto.conf,
the reference to the passfile gets put in, instead:
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
primary_conninfo = 'user=repuser passfile=''/var/db/postgres/.pgpass''
channel_binding=prefer host=10.1.1.1 port=5432 sslmode=''verify-ca''
sslnegotiation=postgres sslcompression=0 sslcertmode=allow sslsni=1
ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres
gssdelegation=0 target_session_attrs=any load_balance_hosts=disable
dbname=foo'
But it seems postgres won't actually read the passfile.
Sep 26 12:01:27 hostname postgres[42455]: [7-1] 2025-09-26 12:01:27.658
UTC [42455] FATAL: could not connect to the primary server: connection to
server at "10.1.1.1", port 5432 failed: fe_sendauth: no password supplied
Am I doing something wrong here?
I'm loathe to hand-edit the file, because of that warning there.
Why does pg_basebackup put a reference to a file it it won't read it?
Is there an alter system command that can be used to properly populate the
password into this file?
-Dan
From | Date | Subject | |
---|---|---|---|
Next Message | Ashish Mukherjee | 2025-09-26 12:18:07 | Downgrade pgsql 17 to pgsql 12 question |
Previous Message | veem v | 2025-09-26 10:23:13 | Correct query for monitor |