Re: Using pgAudit to audit interesting tables for all users except for batch user?

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: "Colin 't Hart" <colinthart(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Using pgAudit to audit interesting tables for all users except for batch user?
Date: 2025-11-18 15:10:46
Message-ID: CAKAnmmLRzMWc8qsKzu7uYoCVTm2fvME3+DqeeXcT6v1JCjiRPw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 18, 2025 at 4:18 AM Colin 't Hart <colinthart(at)gmail(dot)com> wrote:

> alter user <batchuser> set pgaudit.log to 'none';
>

That's close! pgaudit.log deals with session level things, but you want to
exclude object-level things. Try:

create role skip_pguadit;
alter user <batchuser> set pgaudit.role = 'skip_pgaudit';

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Colin 't Hart 2025-11-18 15:55:06 Re: Using pgAudit to audit interesting tables for all users except for batch user?
Previous Message Colin 't Hart 2025-11-18 09:17:44 Using pgAudit to audit interesting tables for all users except for batch user?