From: Michael Banck <michael.banck@credativ.de>
To: Daulat <daulat.dba@gmail.com>
Cc: Holger Jakobs <holger@jakobs.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: How to Log DBA actions
Date: Tue, 21 Dec 2021 21:53:39 +0100
Message-ID: <61c23ed4.1c69fb81.e4f24.27ac@mx.google.com> (raw)
In-Reply-To: <CALfOM6KYD+Jc9eRdi18MU0yUpBBS5CgBvYjNJayz07+MBN0fcw@mail.gmail.com>
References: <CALfOM6LVK2cPspzoihzp7mdr4-SaKJadvD6v+eJWbzkQth2-Rg@mail.gmail.com>
<BF9C0B0F-44FD-4377-BF63-D7ABC6B0FDB3@jakobs.com>
<CALfOM6KYD+Jc9eRdi18MU0yUpBBS5CgBvYjNJayz07+MBN0fcw@mail.gmail.com>
On Mon, Dec 20, 2021 at 12:24:14PM +0530, Daulat wrote:
> It means, there is no use of pgaudit if we already have log_statements
> enabled?
It depends. log_statments, logs *all* statements of the particular type,
so if you want to log whether the DBA do any data changes at all and set
it to "mod", that means, any other data changes (from the application)
will get logged as well.
Maybe you can live with just log_statement = ddl, or you can set
role-specific log_statement = mod,ddl for the DBA roles (this might not
work on a managed Postgres service).
If not, pgaudit allows to log much more fine-grained and targetted audit
events.
Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: michael.banck@credativ.de, daulat.dba@gmail.com, holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: How to Log DBA actions
In-Reply-To: <61c23ed4.1c69fb81.e4f24.27ac@mx.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox