tblsize.
Functions to calculate relation size without grabbing AccessShareLock on a
target relation. The result might be imprecise (i.e in case of CLUSTER in
progress it would return the size of the 'old' table version), but it allows
to get table's size during long operations that grab AccessExclusiveLock (i.e.
during londiste copy of a huge table). The following functions are provided:
pg_total_relation_size_nolock(oid) - returns total relation size.
pg_relation_size_nolock(oid) - returns relation size without considering
indexes or toast.