mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 09:05:17 +00:00
Fix: show size of actually used Redash database (#4706)
'postgres' is a default database name in the Docker image, but if an external database server is used, than Redash database can have a different name (specified in REDASH_DATABASE_URL).
This commit is contained in:
parent
78201c6108
commit
e03e58c5c7
@ -40,7 +40,7 @@ def get_db_sizes():
|
||||
"Query Results Size",
|
||||
"select pg_total_relation_size('query_results') as size from (select 1) as a",
|
||||
],
|
||||
["Redash DB Size", "select pg_database_size('postgres') as size"],
|
||||
["Redash DB Size", "select pg_database_size(current_database()) as size"],
|
||||
]
|
||||
for query_name, query in queries:
|
||||
result = db.session.execute(query).first()
|
||||
|
Loading…
Reference in New Issue
Block a user