You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Postgres size metric seems to run the following query "SELECT pg_database.datname, pg_database_size(pg_database.datname) as size_bytes FROM pg_database" seen (
Description
The Postgres size metric seems to run the following query
"SELECT pg_database.datname, pg_database_size(pg_database.datname) as size_bytes FROM pg_database"
seen (prometheus/postgres.go
Line 207 in 54c3070
This query fails with the following on AWS RDS
ERROR: permission denied for database rdsadmin
This is because it would require CONNECT permissions to all database to get the size with
pg_database_size
When metrics are collected they should only reference the current database.
Is there any reason not to change this to be something like
SELECT current_database() as datname, pg_database_size(current_database()) size_bytes;
?
The text was updated successfully, but these errors were encountered: