Quantcast
Channel: Active questions tagged audit - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 147

Point-in-Time-Recovery of Postgres at an arbitrary time for audit purposes

$
0
0

TL;DRWould you recommend using CDC or pg_wal-based recovery to reproduce the state of the database in an arbitrary time, or stick with joining SCD2 tables (with start end end date for every record) and query all data before given date?

We are developing a new microservice to support our application. For audit purposes our calculations need to be reproducible, so the current plan is to use SCD2 with every record having a start_date and an end_date. This way the state of the database at a given time can be reproduced if calculation from the past needs to be reproduced (if ever requested). Joining and maintaining versioned SCD2 tables seem to be cumbersome, but that is the current plan.

Would making the database store only the current state, i.e. updates would actually update a record, and not just mark it obsolete and insert a new state; and archiving the replica level WAL files with sufficiently good granularity, and rebuilding the state on-demand work?

Or keeping an audit table and rebuild from that?

The scale/magnitude is around a 100k records per year.

Any thoughts welcome.

P.S. we don't have a DBA on the team.


Viewing all articles
Browse latest Browse all 147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>