From: hubert depesz lubaczewski <depesz@depesz.com>
To: Wiwwo Staff <wiwwo@wiwwo.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Allow user to connect to replicas only
Date: Thu, 4 Aug 2022 15:56:53 +0200
Message-ID: <20220804135653.GA6811@depesz.com> (raw)
In-Reply-To: <CAFe70G5zC4RujDs-OCoN+B3sbR7zTAWvkcV=zHiYkUyC5K_8XA@mail.gmail.com>
References: <CAFe70G5zC4RujDs-OCoN+B3sbR7zTAWvkcV=zHiYkUyC5K_8XA@mail.gmail.com>
On Thu, Aug 04, 2022 at 03:42:00PM +0200, Wiwwo Staff wrote:
> Is there any way to create a user allowed to connect to a/any read replica
> only, as in "not allowed to connect to primary"?
Sure. Modify pg_hba.conf on primary to disallow connections as this
user.
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, wiwwo@wiwwo.com
Subject: Re: Allow user to connect to replicas only
In-Reply-To: <20220804135653.GA6811@depesz.com>
References: <CAFe70G5zC4RujDs-OCoN+B3sbR7zTAWvkcV=zHiYkUyC5K_8XA@mail.gmail.com> <20220804135653.GA6811@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