pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Add pg_audit, an auditing extension
Date: Fri, 15 May 2015 17:01:52 -0300
Message-ID: <20150515200152.GG2523@alvh.no-ip.org> (raw)
In-Reply-To: <20150515194421.GX30322@tamriel.snowman.net>
References: <E1YsuFd-0007qf-Ml@gemulon.postgresql.org>
	<CAHGQGwE0XfGJPL6NUjaPcO6sZyiXEE4eCBR96XYkzL-N0mD8uA@mail.gmail.com>
	<20150515194421.GX30322@tamriel.snowman.net>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Stephen Frost wrote:

> * Fujii Masao (masao.fujii@gmail.com) wrote:

> > CREATE EXTENSION pg_audit failed with the following error message
> > when shared_preload_libraries and pg_audit.log are set to pg_audit and
> > ddl, respectively.
> > 
> > =# create extension pg_audit ;
> > ERROR:  pg_event_trigger_ddl_commands() can only be called in an event
> > trigger function
> > CONTEXT:  SQL statement "SELECT UPPER(object_type), object_identity
> >   FROM pg_event_trigger_ddl_commands()"
> 
> Interesting.  I'm very curious about this error and if it impacts other
> extensions which use event triggers.  I'll look into it.

Can you explain what's going on here?  It seems a bit odd to me.

> > The categories of some SQL commands are different between log_statement and
> > pg_audit. For example, REINDEX is treated as DDL in pg_audit, but not in
> > log_statement. That's confusing. We should use the same "category-mapping"
> > rule as much as possible.
> 
> David, Simon and I have all considered this at different times and my
> recollection is that we all felt that it made sense as DDL because
> CLUSTER is DDL (which is actually noted in the comments).  However, you
> bring up a good point that classifying it as DDL makes it different from
> what the core system does and it'd probably be good to be consistent.
> 
> The question here really is- is that the right classification for
> REINDEX to have in core?  If so, shouldn't CLUSTER have the same?

Thiking a bit about this, it seems that REINDEX and CLUSTER are not
really DDL.  They are more "maintenance commands"; they don't define
anything that wasn't defined before.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (69+ messages)  latest in thread

Message-ID: <20150515200152.GG2523@alvh.no-ip.org>
Permalink:  ../20150515200152.GG2523@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20150515200152.GG2523@alvh.no-ip.org

 · 

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-committers@postgresql.org
  Cc: alvherre@2ndquadrant.com, sfrost@snowman.net, masao.fujii@gmail.com
  Subject: Re: pgsql: Add pg_audit, an auditing extension
  In-Reply-To: <20150515200152.GG2523@alvh.no-ip.org>
  References: <E1YsuFd-0007qf-Ml@gemulon.postgresql.org> <CAHGQGwE0XfGJPL6NUjaPcO6sZyiXEE4eCBR96XYkzL-N0mD8uA@mail.gmail.com> <20150515194421.GX30322@tamriel.snowman.net> <20150515200152.GG2523@alvh.no-ip.org>

* 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