with relation(relid, relname, relpages) as (
	select oid, relname, relpages 
	  from pg_class 
	 where relkind in ('r', 'i') and (relname like 'pgbench%' or relname = 'audit_log')
),
q(relid, relname, total_size, free_size) as (
	select relid, relname, pg_relation_size(relid::regclass), (select sum(avail) from pg_freespace(relid::regclass)) 
	  from relation
)
select relname, total_size, round((free_size::numeric / total_size), 6) as fsm_free_size, relation_free_space(relid::regclass::text),
       ((pgstattuple(relid)).free_percent / 100) pgstattuple_free_pct
  from q
 order by 1;
