Re: Web users as database users?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: Tim Clarke <tim(dot)clarke(at)minerva(dot)info>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Web users as database users?
Date: 2019-09-20 14:18:52
Message-ID: 16391.1568989132@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rob Sargent <robjsargent(at)gmail(dot)com> writes:
>> On Sep 20, 2019, at 6:15 AM, Tim Clarke <tim(dot)clarke(at)minerva(dot)info> wrote:
> On 20/09/2019 12:50, David Gallagher wrote:
>>> ... would it make sense to have a user account on the database
>>> to mirror the user account from the web app? Is that an unusual practice?

>> Not at all, we're doing it

> But you likely want a many-to-one mapping of actual user to permission group

Yeah. You're likely to end up with a *lot* of user accounts in this
scenario. There is a restriction on how many distinct GRANTs you can
issue against any one object --- performance will get bad if the ACL
list gets too large. However, you can add lots of users to any group
role. So put the users into appropriate group(s) and issue database
permissions on the group level.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bhardwaj, SONAM- SONAM R 2019-09-20 16:09:35 pg_auto_failover
Previous Message Rob Sargent 2019-09-20 13:01:06 Re: Web users as database users?