Closed haubourg closed 6 years ago
Proposal:
Create qwat_sys.audit_tables
and qwat_sys.unaudit_tables
functions. The former would be responsible for calling qwat_sys.audit_table
for all the tables to be audited. The latter would do the opposite.
Then we can call unaudit_tables
in update/delta/pre-all.py
and audit_tables
in update/delta/post-all.py
, to disable auditing during migrations.
And we'd do likewise for views.
What do you think?
Hey that sounds good and less hacky than playing with replica session variable. @3nids any thought?
This is what I am proposing: https://github.com/qwat/qwat-data-model/compare/master...elemoine:ele_audit. I can turn this into a proper PR if people agree with the approach.
This is the PR for this: https://github.com/qwat/qwat-data-model/pull/233.
Applying migration logs all update inserts or delete triggered inside the delta files. Those should not be logged, they cause a massive DB growup and probably slow down a lot upgrade process too.
See https://github.com/qwat/qwat-data-model/issues/214#issuecomment-356876669
We need a small script to deactivate a/reactivate all logging triggers for deltas and bulk loading task. We need that in the sources, and referenced in the documentation.
Current workaround is to run the following query after the upgrade process: