Approach to creating users in Database

From: Sanjay Minni <sanjay(dot)minni(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Approach to creating users in Database
Date: 2021-04-27 10:32:49
Message-ID: CAMpxBon7xmsd88rY0oQxheoD2zCOg0h9FmoEO6AWSL61UuQ-4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

what is the usual approach in creating users / role in a postgresql
database serving as the data repository to a hosted multi-tenanted
application with a large number of users.

the 2 approaches I can think of is
A. The user stays and is controlled only in the application level, the
application in turn connects with the postgresql database as a single user
name. Any userid to be stored as part of the data is injected by the
application
B. Each user is also created in the postgresql database with grant or
required rights to the tables.

what is the usual practice ?
I am unable to see any benefit in (B) above - i.e. recreating each user in
the postgres database

So what am i missing. A change in approach later can mean a huge rework
later

with warm regards
Sanjay Minni
+91-9900-902902
http://planage.com
https://www.linkedin.com/in/sanjayminni/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message luis.roberto 2021-04-27 11:16:08 Re: DB size
Previous Message Aleš Zelený 2021-04-27 10:01:22 Streaming replica failure