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

From Kristjan Mustkivi
Subject Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does
Date
Msg-id CAOQPKauXJZjoNpGRtRVEfi=LZCoRH115w4hWoAU4T_KU5L4LSg@mail.gmail.com
Whole thread Raw
In response to Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
On Wed, Aug 31, 2022 at 4:27 PM hubert depesz lubaczewski
<depesz@depesz.com> wrote:
>
> 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.

Thank you, depesz!

After I mapped the volume as (-
./v_pgpass:/var/lib/postgresql/.pgpass) CREATE SUBSCRIPTION was able to find it.

Somehow my initial POC fooled me then I kept barking under the wrong tree.

Best Regards,
--
Kristjan Mustkivi

Email: kristjan.mustkivi@gmail.com



pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does
Next
From: Wesley Schwengle
Date:
Subject: View definition changes after reloading pg_dump export