Thanks for the suggestion. I think this will not help us to differentiate between live tuples, dead tuples and free space.
Best regards,
Manuel
From: Torsten Förtsch <tfoertsch123@gmail.com> Sent: 15 July 2024 18:59 To: Shenavai, Manuel <manuel.shenavai@sap.com> Cc: pgsql-general@lists.postgresql.org Subject: Re: Monitoring DB size
Slightly different approach than you might expect. For larger DBs you'd likely want to exclude base and instead use pg_database_size() in addition.
we currently capture the db size (pg_database_size) which gives the “Disk space used by the database with the specified name”. Is it possible to further split this data how much space is occupied by live tuples, dead tuples and free space?
We would like to have something like:
DB Size: 200 MB, live tuple 100MB, Dead Tuple: 20 MB, free space 80MB