How to find big tables of a PostgreSQL database?

SELECT
	table_name,
	pg_size_pretty(pg_total_relation_size(quote_ident(table_name))),
	pg_total_relation_size(quote_ident(table_name))
FROM information_schema.tables
WHERE '<database>' = table_schema
ORDER BY 3 DESC
LIMIT 20;

2024-01-08--20-03-05

stackoverflow.com/a/21738505

See also: How to find big tables of a MySQL database?