To Get all the user Table names in the database using:
select relname from pg_stat_user_tables;
relname
-------
Table1
Table2
Table3
To Get the free space marked by vacuum of one table using:
SELECT sum(avail) FROM pg_freespace('Table1');
sum
-----
1728
I want to get the total free space of all the tables in single query.
Say for example,
Table1 has 1728 freespace
Table2 has 100 freespace
Table3 has 100 freespace
How to get 1928 as answer with a query?