Skip to content

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.

  • 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
  • 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.

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.
Language Integration guides
JavaScript / TypeScript Prisma, Drizzle, TypeORM, Supabase JS, MikroORM
Ruby Rails / Active Record
Python SQLAlchemy, Django

The integrations are open source.

  1. Your application and SQL clients continue using your existing PostgreSQL database.
  2. Audit reads committed row changes from PostgreSQL's write-ahead log using logical replication.
  3. Application context from ORM integrations is combined with the row changes.
  4. PgStack stores the change history separately. It is available in the Audit view and through a PostgreSQL-compatible database.

PgStack Audit architecture showing application changes and optional ORM context captured from PostgreSQL, stored separately, and queried through PgStack