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

From Stephen Frost
Subject Re: BUG #11350: ALTER SYSTEM is not DDL?
Date
Msg-id 20140905123647.GO16422@tamriel.snowman.net
Whole thread Raw
In response to Re: BUG #11350: ALTER SYSTEM is not DDL?  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: BUG #11350: ALTER SYSTEM is not DDL?
List pgsql-bugs
Amit,

* Amit Kapila (amit.kapila16@gmail.com) wrote:
> On Fri, Sep 5, 2014 at 12:44 AM, Stephen Frost <sfrost@snowman.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.
>=20
> 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...
>=20
> I think fix should be in explanation of log_statement, something like bel=
ow:
> 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

pgsql-bugs by date:

Previous
From: Amit Kapila
Date:
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?
Next
From: Eric Malm
Date:
Subject: Re: Error with citext extension when upgrading from 9.0.3 to 9.3.5: 'cannot cast type oid[] to oidvector'