postgres auditing truncates and deletes on tables

From: Ayub M <hiayub(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: postgres auditing truncates and deletes on tables
Date: 2020-12-15 17:13:39
Message-ID: CAOS0qEu5uLicZepS5ec0ksuYbwaGzJXTxzpyCihk3ZU4UDsmGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

for an RDS Aurora PostgreSQL v11.7 database I want to setup DDL and
truncate and delete auditing.

I am setting log_statement to DDL, to log all DDLs (this excludes truncate
statements). I also want to setup auditing only for deletes and truncates
on tables. I don't want to set log_statement to all, as this would fill up
my logs.

Checking in pg_audit, it supports write class which includes delete and
truncate, but it also includes write/update and copy which I don't need.

Is there any way to setup auditing to audit DDL plus deletes/truncates only
using pg_audit/native auditing?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2020-12-15 17:26:43 Re: pg_ctl.exe deleted on abrupt shutdown of Windows
Previous Message Ron 2020-12-15 16:00:40 Re: pg_ctl.exe deleted on abrupt shutdown of Windows