postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

Add table sizes

Open mowirth opened this issue 1 year ago • 2 comments

This MR adds total_relation_size, relation_size, indexes_size for all tables in all schemas.

Implements #1036

mowirth avatar May 27 '24 21:05 mowirth

I'm waiting for it

kostya-skw avatar Jul 02 '24 09:07 kostya-skw

@sysadmind Would it be possible to add this functionality?

bilkoua avatar Mar 26 '25 15:03 bilkoua

Up ! Would it be possible to add this functionality?

azdfzshffg avatar Oct 31 '25 11:10 azdfzshffg

@sysadmind @spantaleev it be possible to add this functionality?

azdfzshffg avatar Dec 04 '25 09:12 azdfzshffg

[inputs.sql]
driver = "postgres"
dsn = "host=/run/postgresql user=myuser dbname=mydb"
[[inputs.sql.query]]
query = "SELECT current_database() AS db, schemaname, relname, pg_total_relation_size(relid) AS total_size_bytes FROM pg_statio_user_tables"
tag_columns_include = ["db", "schemaname", "relname"]

bilkoua avatar Dec 05 '25 10:12 bilkoua