From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Keaney, Will <will.keaney@kroger.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Postgres 13 streaming replication standby not sending password, 'fe_sendauth: no password supplied'
Date: Thu, 11 Jan 2024 09:55:03 +0100
Message-ID: <348f10200facc875103601ef92d86cfd4567e1ed.camel@cybertec.at> (raw)
In-Reply-To: <BL1PR19MB6036B8DE8C1E19E5D73BF1EB9E692@BL1PR19MB6036.namprd19.prod.outlook.com>
References: <BL1PR19MB6036B8DE8C1E19E5D73BF1EB9E692@BL1PR19MB6036.namprd19.prod.outlook.com>
On Wed, 2024-01-10 at 22:51 +0000, Keaney, Will wrote:
> However, the standby is unable to authenticate to the primary to begin recovery during startup.
> It logs an error, "FATAL: could not connect to the primary server: fe_sendauth: no password supplied".
>
> pg_hba.conf on the primary:
> host all,replication repl primary-database-server scram-sha-256
> host all,replication repl standby-database-server scram-sha-256
>
> myrecovery.conf on the standby:
> primary_conninfo = 'host=primary-database-server port=5432 user=repl application_name=standby-server-name'
> recovery_target_timeline = 'latest'
> primary_slot_name = 'standby_replication_slot'
>
> .pgpass on the standby:
> # hostname:port:database:username:password
> *:*:replication:repl:repl_user_password
make sure that .pgpass is in the home directory of the PostgreSQL user and has
restrictive permissions (0600). Try using it with a manual connection attempt
via "psql".
Yours,
Laurenz Albe
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: laurenz.albe@cybertec.at, will.keaney@kroger.com
Subject: Re: Postgres 13 streaming replication standby not sending password, 'fe_sendauth: no password supplied'
In-Reply-To: <348f10200facc875103601ef92d86cfd4567e1ed.camel@cybertec.at>
References: <BL1PR19MB6036B8DE8C1E19E5D73BF1EB9E692@BL1PR19MB6036.namprd19.prod.outlook.com> <348f10200facc875103601ef92d86cfd4567e1ed.camel@cybertec.at>
* 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