问题
I have a user in Amazon Redshift. I want that user to be able to do read-only queries against the system tables:
http://docs.aws.amazon.com/redshift/latest/dg/cm_chap_system-tables.html
But I don't know how to grant a user who is not a superuser access to these tables as it does not appear to be documented anywhere on amazon.
回答1:
Obviously you don't want to grant superuser to another user just so they can see system logs. Being able to monitor is a very common use case that shouldn't require giving someone carte blanche access.
Thankfully you have the ability to grant access to system tables using the syslog access
option.
alter user user123 syslog access unrestricted
See Redshift documentation on visibility
回答2:
If you are a Superuser, you can make other user as superuser or create a new superuser and then other user can query system table and views. Use createuser privilege.
Below is the sample query
create user user_super createuser password '1234';
alter user user_super createuser;
Be careful while making any superuser, superuser gets all access including grant and revoke and query run from superuser always goes to query-1 and will make other queries wait until finished.
来源:https://stackoverflow.com/questions/39582173/how-do-i-grant-access-to-an-amazon-redshift-user-to-read-the-system-tables-view