Re: [GENERAL] Allow login on slave only - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Allow login on slave only
Date
Msg-id CAKFQuwZLjpN9zEswU8AiMhYetM5m-upWuxXqNgV996t9u8LVPA@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Allow login on slave only  ("Andomar" <andomar@aule.net>)
List pgsql-general
On Fri, Dec 16, 2016 at 9:17 AM, Andomar <andomar@aule.net> wrote:

We run a master server and a hot standby server. Reporting users login to the standby server to run long queries. However, their login is also valid on the master server. Is it possible to prevent a user from logging in to the master server?

 

A statement like:

 

    alter role newbie_business_analyst nologin;

 

Is replicated, so it would block logins on both servers.


​I suspect that the only way to do this would be outside of the catalog.  Either via firewall rules or pg_hba.conf​ (and the "reject" option)


David J.


pgsql-general by date:

Previous
From: "Andomar"
Date:
Subject: [GENERAL] Allow login on slave only
Next
From: Sherrylyn Branchaw
Date:
Subject: Re: [GENERAL] Allow login on slave only