From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Niels Jespersen <NJN(at)dst(dot)dk> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Implementing pgaudit extension on Microsoft Windows |
Date: | 2019-02-12 07:59:55 |
Message-ID: | CAFj8pRB1jnOT-kSYbpLiDZB7GHmJvN6Cp1YaZmYjRKgYQ2S6=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
út 12. 2. 2019 v 8:57 odesílatel Niels Jespersen <NJN(at)dst(dot)dk> napsal:
> Thanks Tom
>
> alter system set pgaudit.log = 'all'; -- Works, it results in 2019-02-12
> 08:51:49.109 CET [13560] LOG: parameter "pgaudit.log" changed to "all"
> after select pg_reload_conf();
> alter system set pgaudit.logx = 'all'; -- Notice spelling error logx:
> Fails, it results immediately in 2019-02-12 08:53:04.412 CET [12856]
> ERROR: unrecognized configuration parameter "pgaudit.logx" 2019-02-12
> 08:53:04.412 CET [12856] STATEMENT: alter system set pgaudit.logx = 'all';
>
> pgaudit is loaded, as show by:
>
> localhost postgres(at)postgres#show shared_preload_libraries;
> shared_preload_libraries
> --------------------------
> pgaudit
> (1 row)
>
> localhost postgres(at)postgres#
>
> pgaudit.dll is locked py postgres.exe, if I try to remove it from the lib
> folder.
>
> All looks normal, except no logs from auditing.
>
and it doesn't work too if you use postgresql.conf?
Pavel
> Regards Niels
>
>
> -----Oprindelig meddelelse-----
> Fra: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Sendt: 11. februar 2019 15:44
> Til: Niels Jespersen <NJN(at)dst(dot)dk>
> Cc: 'pgsql-general(at)lists(dot)postgresql(dot)org' <
> pgsql-general(at)lists(dot)postgresql(dot)org>
> Emne: Re: Implementing pgaudit extension on Microsoft Windows
>
> Niels Jespersen <NJN(at)dst(dot)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 something is 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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2019-02-12 08:00:51 | Re: Implementing pgaudit extension on Microsoft Windows |
Previous Message | Niels Jespersen | 2019-02-12 07:57:41 | SV: Implementing pgaudit extension on Microsoft Windows |