On Mon, 2024-05-27 at 15:16 +0530, Sathish Reddy wrote:
> I am looking for all toast tables with size from cluster level all databases.
> it need to perform as like pg_stat_activity
SELECT oid::regclass,
pg_relation_size(oid)
FROM pg_class
WHERE relkind = 't'
AND relnamespace = 'pg_toast'::regnamespace;
That will show you all TOAST tables from the current database.
You have to connect to all databases and run the query in each one.
Yours,
Laurenz Albe