pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14007: log_statement doesn't work when applied to a 'group' 2+ messages / 2 participants [nested] [flat]
* BUG #14007: log_statement doesn't work when applied to a 'group' @ 2016-03-08 22:14 ryan.schannauer@vwr.com 2016-03-08 23:21 ` Re: BUG #14007: log_statement doesn't work when applied to a 'group' David G. Johnston <david.g.johnston@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: ryan.schannauer@vwr.com @ 2016-03-08 22:14 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 14007 Logged by: Ryan Schannauer Email address: ryan.schannauer@vwr.com PostgreSQL version: 9.4.1 Operating system: linux Description: I have defined a group. I then assign permissions to that group. I then assign that group to individual users. I want to be able to log 'all' statements for everyone who has been assigned that group. This does not work. I need to set log_statement='all' for each individual user. Is this by design? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14007: log_statement doesn't work when applied to a 'group' 2016-03-08 22:14 BUG #14007: log_statement doesn't work when applied to a 'group' ryan.schannauer@vwr.com @ 2016-03-08 23:21 ` David G. Johnston <david.g.johnston@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: David G. Johnston @ 2016-03-08 23:21 UTC (permalink / raw) To: ryan.schannauer@vwr.com; +Cc: pgsql-bugs On Tue, Mar 8, 2016 at 3:14 PM, <ryan.schannauer@vwr.com> wrote: > The following bug has been logged on the website: > > Bug reference: 14007 > Logged by: Ryan Schannauer > Email address: ryan.schannauer@vwr.com > PostgreSQL version: 9.4.1 > Operating system: linux > Description: > > I have defined a group. I then assign permissions to that group. I then > assign that group to individual users. I want to be able to log 'all' > statements for everyone who has been assigned that group. This does not > work. I need to set log_statement='all' for each individual user. Is this > by design? > > Yes. You have to read a bit between the lines in the documentation though. Inheritance pertains only the privileges controlled by GRANT/REVOKE. """ > These clauses determine whether a role "inherits" the privileges of roles it is a member of """ http://www.postgresql.org/docs/9.5/static/sql-createrole.html and """ > Values set with ALTER DATABASE and ALTER ROLE are applied only when starting a fresh database session. """ http://www.postgresql.org/docs/9.5/static/config-setting.html#CONFIG-SETTING-SQL-COMMAND-INTERACTION and """ > Role-specific variable settings take effect only at login; SET ROLE and SET SESSION AUTHORIZATION do not process role-specific variable settings. """ http://www.postgresql.org/docs/9.5/static/sql-alterrole.html The take-away is that there is no inheritance involved with ALTER ROLE ... SET and thus it only makes sense to issue it against login roles. The main issue with making SET inheritable is dealing with multiple inheritance. The cost of doing hierarchy traversal seems immaterial and supposedly could be performed during write instead of read (i.e., a trigger when the relevant catalog is updated). David J. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-03-08 23:21 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-03-08 22:14 BUG #14007: log_statement doesn't work when applied to a 'group' ryan.schannauer@vwr.com 2016-03-08 23:21 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox