From: hubert depesz lubaczewski <depesz@depesz.com>
To: Kristjan Mustkivi <sonicmonkey@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does
Date: Wed, 31 Aug 2022 15:27:58 +0200
Message-ID: <20220831132757.GA28040@depesz.com> (raw)
In-Reply-To: <CAOQPKat69_JoFF2UPcSKuFixti=7G3g+KXWS+wUNFTXHY2Batg@mail.gmail.com>
References: <CAOQPKattt3g2dEKqiC9qdp4bxAHWipVO5fWy0En8MT9aw5SKmA@mail.gmail.com>
<20220831130720.GA18978@depesz.com>
<CAOQPKat69_JoFF2UPcSKuFixti=7G3g+KXWS+wUNFTXHY2Batg@mail.gmail.com>
On Wed, Aug 31, 2022 at 04:26:22PM +0300, Kristjan Mustkivi wrote:
> And as said, the psql utility has no problems finding the .pgass where
> it is. If I lie to it about the pgpass location i.e by giving
> passfile=/root/.pgpassx it will ask for password.
of course it doesn't have problem, because you run it as root.
put subscription is run by pg backend, which runs as postgres user, not
root!
also - no pg tool cares about "passfile" env variable, so it is just
ignored.
Best regards,
depesz
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: depesz@depesz.com, sonicmonkey@gmail.com
Subject: Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does
In-Reply-To: <20220831132757.GA28040@depesz.com>
References: <CAOQPKattt3g2dEKqiC9qdp4bxAHWipVO5fWy0En8MT9aw5SKmA@mail.gmail.com> <20220831130720.GA18978@depesz.com> <CAOQPKat69_JoFF2UPcSKuFixti=7G3g+KXWS+wUNFTXHY2Batg@mail.gmail.com> <20220831132757.GA28040@depesz.com>
* 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