Re: Help with configuring pgAudit

From: Dave Hughes <dhughes20(at)gmail(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Rajni Baliyan <saan654(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Help with configuring pgAudit
Date: 2019-11-21 22:40:28
Message-ID: CAFTBbFAuX4CcjMswx9oPwgsU2nr23Fk1xRiXZrs9KwyUU8+Dmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oh okay! I wasn't aware of the pg_settings system view. Thanks for all
the info!

On Thu, Nov 21, 2019 at 1:36 PM Joe Conway <mail(at)joeconway(dot)com> wrote:

> On 11/21/19 1:27 PM, Dave Hughes wrote:
> > Thank you so much for all your help! I found out my issue on accident
> > actually. I backed up all my user accounts into a SQL scripts and after
> > reviewing it, I noticed there were some lines that said:
> > ALTER ROLE postgres SET "pgauid.log" to 'Role';
> > ALTER ROLE postgres SET "pgaudit.log_level" to 'notice';
> > ALTER ROLE postgres SET "pgaudit.log_client" to 'on';
> >
> > I think these commands were leftover from when I ran an integrity check
> > on the pgaudit install (it crashed for other reasons) so it never
> > cleaned up these settings. Once I reset those settings back, it's
> > working perfectly now.
> >
> > Thanks again for helping me getting this thing setup and working!
>
> Ah, makes sense now.
>
> For future reference, you can inspect the pgaudit (and other) active
> settings using the pg_settings system view, e.g.:
>
> select name, setting, source
> from pg_settings where name like 'pgaudit.%';
> name | setting | source
> ----------------------------+-----------------+--------------------
> pgaudit.log | ddl, role, read | configuration file
> pgaudit.log_catalog | on | configuration file
> pgaudit.log_client | off | default
> pgaudit.log_level | log | configuration file
> pgaudit.log_parameter | on | configuration file
> pgaudit.log_relation | off | configuration file
> pgaudit.log_statement_once | off | configuration file
> pgaudit.role | | default
> (8 rows)
>
> HTH,
>
> Joe
>
> --
> Crunchy Data - http://crunchydata.com
> PostgreSQL Support for Secure Enterprises
> Consulting, Training, & Open Source Development
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James (王旭) 2019-11-22 02:50:53 Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
Previous Message Peter J. Holzer 2019-11-21 22:21:32 Re: Isolation of multiple databse instances provided by a single postgres server