I think house keeping needs enhancement. Please see a sample table size from one of my servers.
schemaname | table_name | total_size | table_size | index_size | n_live_tup | n_dead_tup
------------+-------------------------+------------+------------+------------+------------+------------
adempiere | ad_changelog | 73 GB | 42 GB | 31 GB | 196890636 | 28135
adempiere | ad_issue | 32 GB | 26 GB | 6280 MB | 24919706 | 0
adempiere | fact_acct | 17 GB | 6978 MB | 10179 MB | 25611946 | 2048
adempiere | ad_session | 6219 MB | 4498 MB | 1721 MB | 14596410 | 3739
adempiere | m_storagereservationlog | 5956 MB | 4046 MB | 1910 MB | 20030940 | 79
pg_toast | pg_toast_365979 | 3787 MB | 3731 MB | 56 MB | 2388860 | 0
... All others are much less than these.... Total DB size only 175 GB
We cannot blindly delete these tables' data. May need way to identify what can be deleted and what not.
Has anyone handled this already? Please share your thoughts on this.
My thoughts ....
AD_ChangeLog - Keep specific columns like Total, DocStatus, qty. Better to review dictionary for the columns to be logged at first place.
AD_issue, Ad_session - Keep last 1 week...
thank you,
Yahya