Re: Help with configuring pgAudit - Mailing list pgsql-general

From Dave Hughes
Subject Re: Help with configuring pgAudit
Date
Msg-id CAFTBbFAuX4CcjMswx9oPwgsU2nr23Fk1xRiXZrs9KwyUU8+Dmg@mail.gmail.com
Whole thread Raw
In response to Re: Help with configuring pgAudit  (Joe Conway <mail@joeconway.com>)
List 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@joeconway.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

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Isolation of multiple databse instances provided by a singlepostgres server
Next
From: "James(王旭)"
Date:
Subject: Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?