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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
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:36:47
Message-ID: 20140905123647.GO16422@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Amit,

* Amit Kapila (amit(dot)kapila16(at)gmail(dot)com) wrote:
> On Fri, Sep 5, 2014 at 12:44 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > > 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.

Perhaps something went wrong with your quoting, but the above doesn't
make sense to me.

> 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.

Based on the existing logging structure that we have and the existing
precedent, DDL is the right level for these kinds of statements.

> > 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

No. ALTER SYSTEM should be logged at the 'ddl' level and not the 'all'.
I'm fine with improving the documentation, but saying we shouldn't log
ALTER SYSTEM changes at 'ddl' is wrong.

Thanks,

Stephen

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Eric Malm 2014-09-05 14:44:13 Re: Error with citext extension when upgrading from 9.0.3 to 9.3.5: 'cannot cast type oid[] to oidvector'
Previous Message Amit Kapila 2014-09-05 12:32:10 Re: BUG #11350: ALTER SYSTEM is not DDL?