1、查询各表占用的空间
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
)
2、需要维护的table
task, taskdependencyrule, jobexecution, jobexecutionschedule, jobtxdate
3、执行vacuum操作
右键需要维护的table->选择Maintenance->ANALYZE->ok
再选择Vacuum->选择full->ok->REINDEX->ok