Re: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: julian(dot)schauder(at)credativ(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable.
Date: 2016-04-04 21:40:43
Message-ID: 14245.1459806043@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

julian(dot)schauder(at)credativ(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-04-05 03:58:13 Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
Previous Message Alvaro Herrera 2016-04-04 20:46:19 Re: BUG #13970: Vacuum hangs on particular table; cannot be terminated - requires `kill -QUIT pid`