| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Andomar <andomar(at)aule(dot)net> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Allow login on slave only |
| Date: | 2016-12-16 16:23:44 |
| Message-ID: | CAKFQuwZLjpN9zEswU8AiMhYetM5m-upWuxXqNgV996t9u8LVPA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Dec 16, 2016 at 9:17 AM, Andomar <andomar(at)aule(dot)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)
https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
David J.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sherrylyn Branchaw | 2016-12-16 16:27:35 | Re: Allow login on slave only |
| Previous Message | Andomar | 2016-12-16 16:17:15 | Allow login on slave only |