Skip to content

Commit

Permalink
Grant access to postgres_log partitions to admin (#145)
Browse files Browse the repository at this point in the history
It's not nice to query parent table because it will have to parse 7 or 8 csv files all the time.
  • Loading branch information
CyberDem0n committed Apr 12, 2017
1 parent c8cc132 commit f2fa96c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions postgres-appliance/post_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ CREATE FOREIGN TABLE postgres_log_5 () INHERITS (postgres_log) SERVER pglog
OPTIONS (filename '../pg_log/postgresql-5.csv', format 'csv', header 'false');
CREATE FOREIGN TABLE postgres_log_6 () INHERITS (postgres_log) SERVER pglog
OPTIONS (filename '../pg_log/postgresql-6.csv', format 'csv', header 'false');
GRANT SELECT ON postgres_log TO ADMIN;
GRANT SELECT ON postgres_log_0 TO ADMIN;
GRANT SELECT ON postgres_log_1 TO ADMIN;
GRANT SELECT ON postgres_log_2 TO ADMIN;
GRANT SELECT ON postgres_log_3 TO ADMIN;
GRANT SELECT ON postgres_log_4 TO ADMIN;
GRANT SELECT ON postgres_log_5 TO ADMIN;
GRANT SELECT ON postgres_log_6 TO ADMIN;
GRANT SELECT ON postgres_log_7 TO ADMIN;
CREATE LANGUAGE plpythonu;
\i /_zmon_schema.dump
Expand Down

0 comments on commit f2fa96c

Please sign in to comment.