Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiMo-0003nY-BJ for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Sep 2014 01:31:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XPiMn-0000cN-Mz for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Sep 2014 01:31:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XPiMm-0000cG-L1 for pgsql-bugs@postgresql.org; Fri, 05 Sep 2014 01:31:08 +0000 Received: from mail12.ics.ntts.co.jp ([210.232.35.65]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiMh-0001dz-I2 for pgsql-bugs@postgresql.org; Fri, 05 Sep 2014 01:31:07 +0000 Received: from sadoku34.silk.ntts.co.jp (sadoku34 [10.7.18.34]) by mail12.ics.ntts.co.jp (8.14.4/8.14.4/NTTSOFT) with ESMTP id s851Uwqa022499 for ; Fri, 5 Sep 2014 10:30:58 +0900 (JST) Received: (from root@localhost) by sadoku34.silk.ntts.co.jp (8.13.8/NTTSOFT) id s851UwXD010894 for pgsql-bugs@postgresql.org; Fri, 5 Sep 2014 10:30:58 +0900 (JST) Received: from ccmds32.silk.ntts.co.jp [10.107.0.32] by sadoku34.silk.ntts.co.jp with SMTP id LAA10893; Fri, 5 Sep 2014 10:30:58 +0900 Received: from mail147.silk.ntts.co.jp (ccmds32.silk.ntts.co.jp [127.0.0.1]) by ccmds32.silk.ntts.co.jp (8.14.3/8.14.3) with ESMTP id s851UwH5001861 for ; Fri, 5 Sep 2014 10:30:58 +0900 Received: from mail147.silk.ntts.co.jp (localhost.localdomain [127.0.0.1]) by mail147.silk.ntts.co.jp (8.14.5/8.14.5/NTTSOFT) with ESMTP id s851Uqmw026366 for ; Fri, 5 Sep 2014 10:30:52 +0900 Received: from ccmds32 (mail145.silk.ntts.co.jp [10.107.0.145]) by mail147.silk.ntts.co.jp (8.14.5/8.14.5/NTTSOFT) with SMTP id s851UqP1026363 for ; Fri, 5 Sep 2014 10:30:52 +0900 Message-ID: <5409123A.5070502@po.ntts.co.jp> Date: Fri, 05 Sep 2014 10:30:34 +0900 From: Tomonari Katsumata User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #11350: ALTER SYSTEM is not DDL? References: <20140904051356.2926.42797@wrigleys.postgresql.org> <20140904191456.GW16422@tamriel.snowman.net> <20140904201248.GE3625@alap3.anarazel.de> In-Reply-To: <20140904201248.GE3625@alap3.anarazel.de> Content-Type: multipart/mixed; boundary="------------010204010400010506080406" X-CC-Mail-RelayStamp: CC-Mail-V4.3-Client X-CC-Mail-RelayStamp: CC-Mail-V4.3-Server X-Pg-Spam-Score: -3.6 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------010204010400010506080406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Thank you for checking this. Originally this feature might have been close to SET, but currently has an 'ALTER' keyword. Many users don't know this and would be confusing with reading the manual. I made a quick patch for fixing this. Could you check it? regards, ------------- Tomonari Katsumata (2014/09/05 5:12), Andres Freund wrote: > On 2014-09-04 15:14:56 -0400, Stephen Frost wrote: >> * Amit Kapila (amit.kapila16@gmail.com) wrote: >>> On Thu, Sep 4, 2014 at 10:43 AM, 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. >> >> 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... > > +1. > > Greetings, > > Andres Freund > --------------010204010400010506080406 Content-Type: text/x-patch; name="log_statement_with_alter_system.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="log_statement_with_alter_system.patch" diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index f648945..6185863 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -2733,7 +2733,7 @@ GetCommandLogLevel(Node *parsetree) break; case T_AlterSystemStmt: - lev = LOGSTMT_ALL; + lev = LOGSTMT_DDL; break; case T_VariableSetStmt: --------------010204010400010506080406 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --------------010204010400010506080406--