Allow user to connect to replicas only

Started by Wiwwo Staffover 3 years ago2 messagesgeneral
Jump to latest
#1Wiwwo Staff
wiwwo@wiwwo.com

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"?

In reply to: Wiwwo Staff (#1)
Re: Allow user to connect to replicas only

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