From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nick Renders <postgres@arcict.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_upgrade - fe_sendauth: no password supplied
Date: Mon, 06 Sep 2021 09:38:27 -0400
Message-ID: <3012844.1630935507@sss.pgh.pa.us> (raw)
In-Reply-To: <0AEF45A3-8E3C-424E-B746-189AE19B2D3E@arcict.com>
References: <0AEF45A3-8E3C-424E-B746-189AE19B2D3E@arcict.com>
"Nick Renders" <postgres@arcict.com> writes:
> [ pg_upgrade fails with ]
> connection to database failed: fe_sendauth: no password supplied
> could not connect to source postmaster started with the command:
> "/Library/PostgreSQL/11/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
> "/Volumes/Postgres_Data/PostgreSQL/11/data" -o "-p 49156 -b -c
> listen_addresses='' -c unix_socket_permissions=0700 -c
> unix_socket_directories='/Volumes/Free/Upgrade'" start
> According to the documentation, the connection should be established
> with the data in the .pgpass file. Its contents look like this (the
> password has been changed) :
> localhost:49155:*:postgres:password1234
> localhost:49156:*:postgres:password1234
I think this is explained by this statement in the libpq documentation:
The host name localhost is also searched for when the connection is a
Unix-domain socket connection and the host parameter matches libpq's
default socket directory path.
pg_upgrade will use a Unix-domain socket (unless on Windows), but it
intentionally puts it in a non-default place --- we can see
unix_socket_directories='/Volumes/Free/Upgrade'
in your example. That's meant to ensure that outside clients can't
connect to the postmaster(s) during the upgrade, but it's not interacting
too well with this behavior of libpq.
I don't recall for sure, but I think you could have made this work
by putting the socket path (/Volumes/Free/Upgrade) instead of
"localhost" in the .pgpass file.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, postgres@arcict.com
Subject: Re: pg_upgrade - fe_sendauth: no password supplied
In-Reply-To: <3012844.1630935507@sss.pgh.pa.us>
References: <0AEF45A3-8E3C-424E-B746-189AE19B2D3E@arcict.com> <3012844.1630935507@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox