Audit FAQ
Section titled “Audit FAQ”What does Audit do when connecting to a database?
Section titled “What does Audit do when connecting to a database?”Audit uses Change Data Capture (CDC) to read committed changes from PostgreSQL's replication log and store them separately in a structured format. You configure the upstream PostgreSQL connection and select tables to track in the project's Audit settings. Your applications continue using the same database.
What data does Audit store and where?
Section titled “What data does Audit store and where?”Audit stores before-and-after row values, the table and primary key, operation, timestamps, and optional application context in a separate PostgreSQL-compatible PgStack database. You can query history to view previous values and group changes by user or request.
Connections use TLS/SSL for encryption and authentication. You can restrict access by IP address in your project settings.
Does Audit require application changes?
Section titled “Does Audit require application changes?”No. Audit captures committed row changes through PostgreSQL logical replication. Optional backend ORM integrations add application context such as the user, API endpoint, or background job responsible for a change. Install a package when you need that context alongside the database changes.
Does Audit capture changes made outside my application?
Section titled “Does Audit capture changes made outside my application?”Yes. Audit is designed for 100% accuracy in tracking committed changes on tracked tables. Changes made through SQL clients, scripts, and other applications are captured through the same database replication stream. Application context is available only when the writer supplies it through an integration.
Is Audit a SQL query log?
Section titled “Is Audit a SQL query log?”Audit records row-level data changes. It does not record every query, such as a SELECT that reads data. Use Access to record SQL queries executed through temporary Access sessions. Audit and Access can be enabled independently.
Will enabling Audit affect my upstream PostgreSQL?
Section titled “Will enabling Audit affect my upstream PostgreSQL?”Audit captures changes in the background using logical replication. This can use additional disk space for PostgreSQL's write-ahead log (WAL), especially while replication is disconnected. Monitor available disk space as part of your usual database monitoring.
Why are before values missing?
Section titled “Why are before values missing?”PgStack attempts to configure this automatically when it has the required permissions. If previous values are missing, check whether the connection can change the tracked table's replica identity. If it cannot, a user with the required permissions can set REPLICA IDENTITY FULL manually. See your hosting provider guide.
Can I query history from my application?
Section titled “Can I query history from my application?”Yes. Use the separate PgStack database connection and the changes relation. Integration guides include examples for querying history with supported ORMs.
How is Audit different from application-level tracking libraries?
Section titled “How is Audit different from application-level tracking libraries?”Application-level libraries capture changes through model callbacks or other application hooks. Writes that bypass those hooks can be missed. Audit reads committed changes from the database replication log, including direct SQL writes to tracked tables, and stores history separately from upstream PostgreSQL. Optional ORM integrations supply application context. See Alternatives.
How is Audit different from ETL and warehouse tools?
Section titled “How is Audit different from ETL and warehouse tools?”Both can use CDC to read database changes. ETL and warehouse pipelines generally move or transform data for analytics. Audit keeps row-level change history with optional application context, such as who made a change and which request or job caused it.
Is Audit like git for data or event sourcing?
Section titled “Is Audit like git for data or event sourcing?”Audit records database state changes and supports time travel queries without requiring an application rewrite. Its history can show previous row values and the sequence of changes. In an event-sourced application, domain events are the source of truth and application state is derived from them. Audit captures changes to your existing database rather than requiring that architecture.
Copyright © 2026 PgStack
