diff options
Diffstat (limited to 'collectors/python.d.plugin/postgres')
-rw-r--r-- | collectors/python.d.plugin/postgres/postgres.chart.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/collectors/python.d.plugin/postgres/postgres.chart.py b/collectors/python.d.plugin/postgres/postgres.chart.py index 29026a6a3..bd8f71a66 100644 --- a/collectors/python.d.plugin/postgres/postgres.chart.py +++ b/collectors/python.d.plugin/postgres/postgres.chart.py @@ -336,18 +336,18 @@ WHERE d.datallowconn; QUERY_TABLE_STATS = { DEFAULT: """ SELECT - ((sum(relpages) * 8) * 1024) AS table_size, - count(1) AS table_count + sum(relpages) * current_setting('block_size')::numeric AS table_size, + count(1) AS table_count FROM pg_class -WHERE relkind IN ('r', 't'); +WHERE relkind IN ('r', 't', 'm'); """, } QUERY_INDEX_STATS = { DEFAULT: """ SELECT - ((sum(relpages) * 8) * 1024) AS index_size, - count(1) AS index_count + sum(relpages) * current_setting('block_size')::numeric AS index_size, + count(1) AS index_count FROM pg_class WHERE relkind = 'i'; """, |