PgStack Audit
Section titled “PgStack Audit”PgStack Audit captures inserts, updates, and deletes from PostgreSQL and stores change history separately from your upstream PostgreSQL. It runs in the background without changing your existing table structures. Optional ORM integrations add application context, such as the user, API endpoint, or background job responsible for a change.
Audit captures changes made through applications and direct database connections. It works independently of Access.
Highlights
Section titled “Highlights”- Automatic row-level change tracking using PostgreSQL logical replication
- 100% reliability in capturing data changes, even if executed through direct SQL outside the application
- Before-and-after values for inserts, updates, and deletes
- Application context supplied through open-source ORM integrations
- Background capture, with change-history processing outside application query execution
- Change capture without table structure changes or application rewrites
- Time travel queries, with grouping and filtering of recorded changes
- Automatically provisioned cloud infrastructure with scalable storage, separate from the upstream PostgreSQL
Use cases
Section titled “Use cases”- Audit trails: Data change history for audit reviews, customer support, and customer-facing activity feeds.
- Change recovery: Before-and-after values for identifying and correcting unwanted changes.
- Time travel: Previous record values and the sequence of changes over time.
- Troubleshooting: Row changes and application context related to an application issue.
- Trend analysis: Historical changes that can be queried to understand how data evolves.
How it works
Section titled “How it works”Audit integrates at two levels:
- Database level (required): PostgreSQL's write-ahead log supplies committed row changes through logical replication. This pattern is called Change Data Capture (CDC).
- Application level (optional): ORM integrations pass application context alongside changes. The context connects database records to the user, request, or process responsible for a change.
Supported ORMs
Section titled “Supported ORMs”| Language | Integration guides |
|---|---|
| JavaScript / TypeScript | Prisma, Drizzle, TypeORM, Supabase JS, MikroORM |
| Ruby | Rails / Active Record |
| Python | SQLAlchemy, Django |
The integrations are open source.
Architecture overview
Section titled “Architecture overview”- Your application and SQL clients continue using your existing PostgreSQL database.
- Audit reads committed row changes from PostgreSQL's write-ahead log using logical replication.
- Application context from ORM integrations is combined with the row changes.
- PgStack stores the change history separately. It is available in the Audit view and through a PostgreSQL-compatible database.
Explore Audit
Section titled “Explore Audit”Copyright © 2026 PgStack
