Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anAXx-0006D1-Sa for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Apr 2016 19:52:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1anAXx-0000om-2Y for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Apr 2016 19:52:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1anAN0-0006jr-BF for pgsql-bugs@postgresql.org; Mon, 04 Apr 2016 19:41:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anAMx-0005sj-29 for pgsql-bugs@postgresql.org; Mon, 04 Apr 2016 19:41:05 +0000 MIME-Version: 1.0 Subject: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. To: pgsql-bugs@postgresql.org From: julian.schauder@credativ.de Date: Mon, 04 Apr 2016 19:40:24 +0000 Message-ID: <20160404194024.15198.21684@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" 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 The following bug has been logged on the website: Bug reference: 14063 Logged by: Julian Schauder Email address: julian.schauder@credativ.de PostgreSQL version: 9.5.1 Operating system: Linux, Any Description: Howdy Hackers, PostgreSQLs ALTER SYSTEM accepts a newline in its string-statements. This will cause the postgresql.auto.conf to become unreadable and requires system intervention (aka removal of the auto.conf) postgres=# alter system set work_mem to '5MB '; ALTER SYSTEM Time: 37,718 ms postgres=# alter system set work_mem to '5MB'; ERROR: could not parse contents of file "postgresql.auto.conf" Time: 0,453 ms postgres=# alter system reset work_mem ; ERROR: could not parse contents of file "postgresql.auto.conf" Time: 0,331 ms According to code analysis i believe the easiest way around this is tightening the value validation and ignore whitespaces or just remove newline as a whitespace. As this appears to be a new bug is relevant in all versions since ALTER SYSTEM was introduced. regards, julian -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs