This page provides an overview of the pgAudit extension and its functionalities.
The pgAudit extension helps you to configure logs that are often required to comply with government, financial, and ISO certifications.
Database auditing in AlloyDB for PostgreSQL is available through the open-source pgAudit extension. By using this extension, you can selectively record and track AlloyDB operations performed against a given database. The extension provides auditing capabilities to monitor and record a select subset of operations.
The pgAudit extension applies to executed AlloyDB commands and queries. In contrast, Cloud Audit Logs applies to administrative and maintenance operations performed on an AlloyDB instance, as described in Monitor access using Audit logs.
The following limitations apply to the pgAudit functionality:
The log ingestion rate is 4 MB per second. When the load from log generation exceeds the ingestion rate, the following might occur:
Increased disk usage
Disk space exhaustion
If you enable the pgAudit feature and run many queries that meet your audit criteria, it might result in increased disk usage.
Before using this feature, you must:
Monitor the overall disk usage. You cannot monitor the load from log generation separately. Use the
cloudsql.googleapis.com/database/disk/utilization metricin the Metrics explorer.
Reduce the disk usage by running fewer queries or reducing auditing, if required.
If the disk space is not available, it might result in loss of audit logs for some queries.