| From: | Gustavsson Mikael <mikael(dot)gustavsson(at)smhi(dot)se> |
|---|---|
| To: | Ayub M <hiayub(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | SV: postgres auditing truncates and deletes on tables |
| Date: | 2020-12-17 07:43:26 |
| Message-ID: | d0c51c935a86409ba6dad26d4679e1fd@smhi.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
I have used this setup to do something similar.
https://github.com/2ndQuadrant/audit-trigger
KR, Mikael Gustavsson
________________________________
Från: Ayub M <hiayub(at)gmail(dot)com>
Skickat: den 15 december 2020 18:13:39
Till: PostgreSQL General
Ämne: postgres auditing truncates and deletes on tables
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?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kyotaro Horiguchi | 2020-12-17 08:29:38 | Re: Problem with ssl and psql in Postgresql 13 |
| Previous Message | Gustavsson Mikael | 2020-12-17 07:21:08 | Problem with ssl and psql in Postgresql 13 |