PolarDB for PostgreSQL(Compatible with Oracle) supports the pgAudit extension to generate audit logs for clusters in compliance with public service, financial, or ISO requirements. Audit logs help you analyze faults and operations on your clusters to obtain information about data queries.

Precautions

  • The pgAudit extension may generate a large amount of audit log data. The amount of audit log data that is generated varies based on the configuration of the pgAudit extension. Before you use the pgAudit extension to audit objects, we recommend that you evaluate the objects to prevent the pgAudit extension from generating a large amount of audit log data. A large amount of audit log data can exhaust the storage capacity of your clusters.
  • After the pgAudit extension is installed, the pgaudit.polar_mode parameter is added. Default value: true. Valid values:
    • true: PolarDB for PostgreSQL(Compatible with Oracle) generates audit logs to audit files in polar form. After the audit logs are analyzed and processed, you can view the audit logs in the console.
    • false: PolarDB for PostgreSQL(Compatible with Oracle) generates audit logs to error logs based on the original logic of the pgAudit extension. You cannot view them.

Enable or disable the pgAudit extension

To enable or disable the pgAudit extension, go to the Quota Center. Click Apply in the Actions column corresponding to polardb_pg_pgaudit.

References

For more information, see pgAudit documentation.