Stay organized with collections
Save and categorize content based on your preferences.
This page provides an overview of the pgAudit extension and its functionalities.
Overview
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.
Limitations
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 metric
in 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-25 UTC."],[[["The pgAudit extension enables selective recording and tracking of AlloyDB operations, aiding in compliance with various certifications."],["pgAudit focuses on executed commands and queries within AlloyDB, unlike Cloud Audit Logs, which handle administrative tasks."],["Enabling pgAudit can increase disk usage, with a log ingestion rate limit of 4 MB per second, which can lead to disk space exhaustion or audit log loss if exceeded."],["Users must monitor overall disk usage, using `cloudsql.googleapis.com/database/disk/utilization` metric, and manage audit criteria to avoid disk space issues."]]],[]]