pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. 2+ messages / 2 participants [nested] [flat]
* BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. @ 2016-04-04 19:40 julian.schauder@credativ.de 0 siblings, 1 reply; 2+ messages in thread From: julian.schauder@credativ.de @ 2016-04-04 19:40 UTC (permalink / raw) To: pgsql-bugs 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. @ 2016-04-04 21:40 Tom Lane <tgl@sss.pgh.pa.us> parent: julian.schauder@credativ.de 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-04-04 21:40 UTC (permalink / raw) To: julian.schauder@credativ.de; +Cc: pgsql-bugs julian.schauder@credativ.de writes: > 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) Yeah, there's no provision for allowing a newline in postgresql.conf string literals. I believe we debated this in the past and decided it wasn't something we wanted to change, as it would create more confusion than it was worth (for example: what line number to ascribe to such an assignment). It looks like newline is the only troublesome character; there are quoting conventions for backslash and quote, which are the only other characters that are special there. > 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. I'm inclined to just throw an error if someone tries this, not try to clean up after them. If we get lots of complaints about it, we will know we should revisit the aforementioned decision. But there's no reason to put restrictions on GUC values that aren't getting written by ALTER SYSTEM. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-04-04 21:40 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-04-04 19:40 BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. julian.schauder@credativ.de 2016-04-04 21:40 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox