Thread: Allow user to connect to replicas only

Allow user to connect to replicas only

From
Wiwwo Staff
Date:
Hi!
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"?


Re: Allow user to connect to replicas only

From
hubert depesz lubaczewski
Date:
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