Re: Auditing in Postgres

From: Anjul Sahu <anjul(at)cloudraft(dot)io>
To: Tejaswi K T <tejaswi(dot)kt(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Auditing in Postgres
Date: 2024-04-09 12:11:33
Message-ID: CAJvjyb80jhOzpg4GNj49GWmxHuPwCb0Q140jo6qx4xum4yBD+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Tejaswi

You can check in Pgaudit docs.

pgaudit.log

Specifies which classes of statements will be logged by session audit
logging. Possible values are:

-

*READ*: SELECT and COPY when the source is a relation or a query.
-

*WRITE*: INSERT, UPDATE, DELETE, TRUNCATE, and COPY when the destination
is a relation.
-

*FUNCTION*: Function calls and DO blocks.
-

*ROLE*: Statements related to roles and privileges: GRANT, REVOKE,
CREATE/ALTER/DROP
ROLE.
-

*DDL*: All DDL that is not included in the ROLEclass.
-

*MISC*: Miscellaneous commands, e.g. DISCARD, FETCH, CHECKPOINT, VACUUM,
SET.
-

*MISC_SET*: Miscellaneous SET commands, e.g. SET ROLE.
-

*ALL*: Include all of the above.

Thanks,

*Anjul Sahu*
Founder and CEO
Cloudraft <http://cloudraft.io>
Email: anjul(at)cloudraft(dot)io
Phone: +916268918953

On Tue, 9 Apr 2024 at 5:30 PM, Tejaswi K T <tejaswi(dot)kt(at)gmail(dot)com> wrote:

> Hi Team,
> I am from an oracle background and new to postgres.
>
> We recently provisioned postgres database for our application, and have a
> requirement.
>
> Our banking organisation, we have enabled auditing to capture all failed
> DML , in oracle we do with commands like
> AUDIT INSERT ANY TABLE WHENEVER NOT SUCCESSFUL;
>
> Do we have similar commands in pgaudit , which captures only failed DML
> and not the successful ones.
>
> In OLTP, we have millions of data inserts and we are not interested in
> capturing all successful inserts.
>
> thanks in advance
> Tejas
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2024-04-09 12:15:20 Re: Auditing in Postgres
Previous Message Tejaswi K T 2024-04-09 12:00:26 Auditing in Postgres