pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dhinakaran R <dhiraam.postgresql@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Not able to set pgaudit.log with pgaudit 1.3.2 in PostgreSQL 11.9
Date: Sat, 7 Nov 2020 10:55:20 -0800
Message-ID: <cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.com> (raw)
In-Reply-To: <CANB3iMDMufOJh7SCeL+g7YWjP_WH0oHnyKQhf8KVK-x5U2+sZA@mail.gmail.com>
References: <CANB3iMDMufOJh7SCeL+g7YWjP_WH0oHnyKQhf8KVK-x5U2+sZA@mail.gmail.com>

On 11/7/20 10:42 AM, Dhinakaran R wrote:
> Hello,
> 
> I had installed PostgreSQL 11.9 and pgaudit 1.3.2.  updated 
> shared_preload_libraries, restarted PostgreSQL, created an extension for 
> pgaudit and set parameters for pgaudit in postgresql.conf.  But 
> surprisingly pgaudit.log is not getting picked up and neither able to 
> set it manually.
> 
> 
> postgres>pwd
> /usr/pgsql-11/lib
> postgres>ls -ltr *pgaudit*
> -rwxr-xr-x. 1 root root 33088 Oct  6 10:48 pgaudit.so
> postgres>
> 
> postgres>pwd
> /usr/pgsql-11/share/extension
> postgres>ls -ltr *pgaudit*
> -rw-r--r--. 1 root root 145 Oct  6 10:48 pgaudit.control
> -rw-r--r--. 1 root root 615 Oct  6 10:48 pgaudit--1.3.2.sql
> -rw-r--r--. 1 root root 175 Oct  6 10:48 pgaudit--1.3--1.3.1.sql
> -rw-r--r--. 1 root root 177 Oct  6 10:48 pgaudit--1.3.1--1.3.2.sql
> postgres>
> 
> postgres=# create extension pgaudit;
> CREATE EXTENSION
> postgres=# select * from pg_Extension;
>   extname | extowner | extnamespace | extrelocatable | extversion | 
> extconfig | extcondition
> ---------+----------+--------------+----------------+------------+-----------+--------------
>   plpgsql |       10 |           11 | f              | 1.0        |     
>        |
>   pgaudit |       10 |         2200 | t              | 1.3.2      |     
>        |
> (2 rows)
> 
> 
> 
> postgres=# select name, setting, source from pg_settings where name like 
> '%audit%';
>              name            | setting |       source
> ----------------------------+---------+--------------------
>   pgaudit.log                | none    | default
>   pgaudit.log_catalog        | on      | configuration file
>   pgaudit.log_client         | on      | configuration file
>   pgaudit.log_level          | log     | default
>   pgaudit.log_parameter      | on      | configuration file
>   pgaudit.log_relation       | off     | default
>   pgaudit.log_statement_once | off     | default
>   pgaudit.role               |         | default
> (8 rows)
> 
> 
> 
> 
> But I have below parameters in postgresql.conf.. not sure why its not 
> picking up pgaudit.log value.

Have you looked at the Postgres log to see if there are relevant error 
messages?

> 
> log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
> log_line_prefix = '%m %u %d [%p]: '
> shared_preload_libraries = 'pgaudit' # (change requires restart)
> pgaudit.log = 'write, role, ddl, misc_set'
> pgaudit.log_catalog = on
> pgaudit.log_client = on
> pgaudit.log_parameter = on
> 
> Thanks,
> Dhiraam.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)  latest in thread

Message-ID: <cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.com>
Permalink:  ../cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.com/
Also on:    postgresql.org/message-id/cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, dhiraam.postgresql@gmail.com
  Subject: Re: Not able to set pgaudit.log with pgaudit 1.3.2 in PostgreSQL 11.9
  In-Reply-To: <cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.com>
  References: <CANB3iMDMufOJh7SCeL+g7YWjP_WH0oHnyKQhf8KVK-x5U2+sZA@mail.gmail.com> <cef0041c-95d4-dd6d-f3b2-e42d4d4e7df2@aklaver.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