Hi,

What do you think of adding a NO RESET option to the SET ROLE command?

Right now Postgres can enforce data security with roles and RLS, but
role-per-end-user doesn't really scale:  Db connections are per-role, so a
connection pooler can't share connections across users.  We can work around
this with policies that use session variables and checks against
current_user, but it seems like role-per end user would be more beautiful.
If SET ROLE had a NO RESET option, you could connect through a connection
pooler as a privileged user, but downgrade to the user's role for the
duration of the session.

Thanks,
Eric

Reply via email to