From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Thom Brown <thom(at)linux(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-committers(at)postgresql(dot)org" <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Add pg_audit, an auditing extension |
Date: | 2015-05-15 10:20:56 |
Message-ID: | CAFj8pRDVF113+NFVxP5j54hx85Fi5MF0y+Q3xqn_Rh=C_8TitQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
2015-05-15 12:14 GMT+02:00 Thom Brown <thom(at)linux(dot)com>:
> On 15 May 2015 at 10:56, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> > Hi
> >
> > I am testing it, and output is strange
> >
> > 2015-05-15 11:49:25.046 CEST pavel postgres: LOG: AUDIT:
> > SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,<not logged>
> > 2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT: drop table foo;
> > 2015-05-15 11:49:28.291 CEST pavel postgres: LOG: AUDIT:
> > SESSION,2,1,DDL,CREATE TABLE,,,"CREATE TABLE foo(a int, b int);",<not
> > logged>
> > 2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT: CREATE TABLE
> foo(a
> > int, b int);
> > 2015-05-15 11:49:31.486 CEST pavel postgres: LOG: AUDIT:
> > SESSION,3,1,WRITE,INSERT,,,"INSERT INTO foo VALUES(10,20);",<not logged>
> > 2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT: INSERT INTO foo
> > VALUES(10,20);
> > 2015-05-15 11:49:33.446 CEST pavel postgres: LOG: AUDIT:
> > SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,<not logged>
> > 2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT: SELECT * FROM
> foo
> > WHERE a = 10;
> >
> > I am missing object name, unexpected string <not logged>
> >
> > configuration:
> > pg_audit.log = 'read, write, ddl'
>
> From what I can tell, that last value should be for parameters. You'd
> need to set pg_audit.log_parameter to on, and then prepare and execute
> a statement with a parameter.
>
yes
2015-05-15 12:18:39.545 CEST pavel postgres: LOG: AUDIT:
SESSION,1,1,READ,PREPARE,,,prepare x(int) as select * from foo where a =
$1;,<none>
2015-05-15 12:18:39.545 CEST pavel postgres: STATEMENT: prepare x(int) as
select * from foo where a = $1;
2015-05-15 12:18:48.065 CEST pavel postgres: LOG: AUDIT:
SESSION,2,1,READ,SELECT,,,prepare x(int) as select * from foo where a =
$1;,10
2015-05-15 12:18:48.065 CEST pavel postgres: STATEMENT: execute x(10);
but when pg_audit.log_parameter is off, then this value should be empty
Regards
Pavel
>
> --
> Thom
>
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2015-05-15 10:37:34 | Re: pgsql: Add pg_audit, an auditing extension |
Previous Message | Thom Brown | 2015-05-15 10:14:40 | Re: pgsql: Add pg_audit, an auditing extension |
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2015-05-15 10:37:34 | Re: pgsql: Add pg_audit, an auditing extension |
Previous Message | Thom Brown | 2015-05-15 10:14:40 | Re: pgsql: Add pg_audit, an auditing extension |