Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030279Openbravo ERPA. Platformpublic2015-06-29 13:432022-02-01 08:09
alostale 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0030279: log clean up process doesn't vacuum tables deleted via FK cascaded deletion
When log clean up process is run in PostgreSQL, tables that where cleaned up are vacuumed.

If there are tables that are deleted because they have a delete cascade FK to one of the tables marked to be deleted, vacuum is not executed for them.
In the default configuration ad_session is marked to be deleted, ad_session_usage_audit is also deleted via FK.

Execute clean up process and check there is a vacuum for ad_session but not for ad_session_usage_audit.
Check cascaded FK tables to also vacuum them:

           SELECT distinct pc1.relname
             FROM pg_constraint pc, pg_class pc1, pg_class pc2
            WHERE pc.contype='f' and pc.conrelid= pc1.oid
              and pc.confrelid = pc2.oid
              and pc2.relname in :deletedTables

Note this can be recursive to several levels
Performance
related to feature request 00289303.0PR15Q2 closed alostale include Logs Clean Up Utility module within Openbravo 3 distribution 
Issue History
2015-06-29 13:43alostaleNew Issue
2015-06-29 13:43alostaleAssigned To => platform
2015-06-29 13:43alostaleModules => Core
2015-06-29 13:43alostaleTriggers an Emergency Pack => No
2015-06-29 13:43alostaleStatusnew => acknowledged
2015-06-29 13:43alostaleTarget Version => 3.0PR15Q4
2015-06-29 13:46alostaleRelationship addedrelated to 0028930
2015-06-29 13:46shuehnerIssue Monitored: shuehner
2015-06-29 13:47alostaleTag Attached: Performance
2015-10-01 07:51alostaleTarget Version3.0PR15Q4 =>
2022-02-01 08:09alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.