Re: BUG #11350: ALTER SYSTEM is not DDL?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: katsumata(dot)tomonari(at)po(dot)ntts(dot)co(dot)jp, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?
Date: 2014-09-05 12:32:10
Message-ID: CAA4eK1JfX-oQbXvDd03-b2Ex-maqJZOsdLgzDa91TOr8sH0w=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Sep 5, 2014 at 12:44 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>
> * Amit Kapila (amit(dot)kapila16(at)gmail(dot)com) wrote:
> > On Thu, Sep 4, 2014 at 10:43 AM, <katsumata(dot)tomonari(at)po(dot)ntts(dot)co(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2014-09-05 12:36:47 Re: BUG #11350: ALTER SYSTEM is not DDL?
Previous Message Tomonari Katsumata 2014-09-05 01:30:34 Re: BUG #11350: ALTER SYSTEM is not DDL?