Re: BUG #11350: ALTER SYSTEM is not DDL? - Mailing list pgsql-bugs

From Amit Kapila
Subject Re: BUG #11350: ALTER SYSTEM is not DDL?
Date
Msg-id CAA4eK1JfX-oQbXvDd03-b2Ex-maqJZOsdLgzDa91TOr8sH0w=Q@mail.gmail.com
Whole thread Raw
In response to Re: BUG #11350: ALTER SYSTEM is not DDL?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: BUG #11350: ALTER SYSTEM is not DDL?
Re: BUG #11350: ALTER SYSTEM is not DDL?
List pgsql-bugs
On Fri, Sep 5, 2014 at 12:44 AM, Stephen Frost <sfrost@snowman.net> wrote:
>
> * Amit Kapila (amit.kapila16@gmail.com) wrote:
> > On Thu, Sep 4, 2014 at 10:43 AM, <katsumata.tomonari@po.ntts.co.jp>
wrote:
> > > So I think log message should be outputted when executing ALTER SYSTEM
> > with
> > > 'log_statement = ddl'.
> > >
> > > Am I missing something?
> >
> > Currently it is considered similar to SET statement as it performs
> > similar operation except that the value for configuration gets set
> > in configuration file.  Do you see any reason for it to be considered
> > differently except that the command has ALTER keyword?
>
> Uh, it's nothing like SET as SET only affects the current session.

and Alter System affects at system level, both of these can't
be considered as DDL, may be a separate category.
If we consider below types of statements, SET will fall into
4th category and Alter System will fall into 5th category, but
none should be considered as DDL.

1. DDL
2. DML
3. Transaction Control
4. Session Control
5. System Control

> It's much, much closer to ALTER ROLE, which correctly logs at the DDL
> level.  This should be fixed, and before 9.4 goes out...

I think fix should be in explanation of log_statement, something like below:
ddl logs all data definition statements, such as CREATE, ALTER
(except ALTER SYSTEM), and DROP statements

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: Tomonari Katsumata
Date:
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?
Next
From: Stephen Frost
Date:
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?