SET ROLE x NO RESET - Mailing list pgsql-hackers

From Eric Hanson
Subject SET ROLE x NO RESET
Date
Msg-id CACA6kxgdzt-oForijaxfXHHhnZ1WBoVGMXVwFrJqUu-Hg3C-jA@mail.gmail.com
Whole thread Raw
Responses Re: SET ROLE x NO RESET
Re: SET ROLE x NO RESET
Re: SET ROLE x NO RESET
List pgsql-hackers
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

pgsql-hackers by date:

Previous
From: Jacob Burroughs
Date:
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Next
From: Joe Conway
Date:
Subject: Re: SET ROLE x NO RESET