select pt.schemaname||'.'||ts.relname as tablename,
pg_relation_size(pt.schemaname||'.'||ts.relname)/1024/1024/1024 as tablesizegb,
ts.stausename,ts.stasubtype,ts.statime from (
SELECT ps.stausename,ps.staactionname,ps.stasubtype,pc.relname,ps.statime
FROM pg_stat_last_operation ps,pg_class pc WHERE ps.objid = pc.oid
and ps.staactionname='CREATE'
and ps.statime::date >= 'enddate '
) ts,pg_tables pt
where ts.relname = pt.tablename
order by tablesizegb desc
enddate :结束的时间,格式如:2019-12-27
tablesizegb : 字段的单位是GB