Re: Implementing pgaudit extension on Microsoft Windows - Mailing list pgsql-general

From Tom Lane
Subject Re: Implementing pgaudit extension on Microsoft Windows
Date
Msg-id 6972.1549896212@sss.pgh.pa.us
Whole thread Raw
In response to Implementing pgaudit extension on Microsoft Windows  (Niels Jespersen <NJN@dst.dk>)
Responses SV: Implementing pgaudit extension on Microsoft Windows  (Niels Jespersen <NJN@dst.dk>)
List pgsql-general
Niels Jespersen <NJN@dst.dk> writes:
> Copied pgaudit.dll to C:\Program Files\PostgreSQL\11\lib
> Copied  pgaudit.control and pgaudit--1.3.sql to C:\Program Files\PostgreSQL\11\share\extension
> Set shared_preload_libraries = 'pgaudit'
> Restart PostgreSQL
> Run "CREATE EXTENSION pgaudit;"
> alter system set pgaudit.log = 'all';
> select pg_reload_conf();

> Nothing enters the log-file from pgaudit. Creating tables (relations, sorry). Selecting from tables, nothing in the
log.

Hm, what you describe above looks right.

> I can see that alter system set pgaudit.logx = 'all';  complains about "unrecognized configuration parameter", so
somethingis known about pgaudit. 

No, that means the postmaster *doesn't* have pgaudit loaded.

The fact that CREATE EXTENSION worked implies that you've got the library
correctly built, so I think this must boil down to the
"shared_preload_libraries" setting not having taken.  You could
cross-check that by seeing what "SHOW shared_preload_libraries"
prints.

I wonder if you forgot to remove the comment marker (#) on the
shared_preload_libraries line?

            regards, tom lane


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Implementing pgaudit extension on Microsoft Windows
Next
From: Pavel Stehule
Date:
Subject: Re: Implementing pgaudit extension on Microsoft Windows