Re: SQL command to edit postgresql.conf, with comments

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, Darren Duncan <darren(at)darrenduncan(dot)net>, postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL command to edit postgresql.conf, with comments
Date: 2010-10-13 16:27:27
Message-ID: AANLkTikBrEu=QeHgE==8iMP_GtB4M0Ccq-G0qNo8AYrX@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 13, 2010 at 10:25 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> You're not alone on this at all: I agree 100%.  I don't like your
>> proposed syntax, but I completely agree with your concern.  I don't
>> see what's wrong with having the initial contents of postgresql.conf
>> look like this (these are the settings that are uncommented by default
>> on my machine):
>
>> # type "man postgresql.conf" for help on editing this file
>> max_connections = 100
>> shared_buffers = 32MB
>> datestyle = 'iso, mdy'
>> lc_messages = 'en_US.UTF-8'
>> lc_monetary = 'en_US.UTF-8'
>> lc_numeric = 'en_US.UTF-8'
>> lc_time = 'en_US.UTF-8'
>> default_text_search_config = 'pg_catalog.english'
>
> I'm not sure if anybody is particularly against the initial contents
> looking like that.  The big problem, which both you and Dimitri are
> conveniently ignoring, is that if people are allowed to hand-edit
> the file they are going to introduce comments that no mechanical
> parser will do a nice job of preserving.  And they're not going to be
> happy when SET PERMANENT has a side-effect of throwing away their
> comments.

But creating a separate file doesn't fix that problem. It just moves
it around. If people will expect comments in postgresql.conf to get
preserved, then why won't they also expect comments in
postgresql.conf.auto to get preserved?

If the answer is "because postgresql.conf has always worked that way
before", then add one more line to the proposed initial contents
saying it's not true any more. It can be the same line you were going
to put in postgresql.conf.auto explaining the same fact.

# The SQL command SET PERMANENT rewrites this file and may move or
remove comment lines.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-13 16:30:25 Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)
Previous Message Andres Freund 2010-10-13 16:23:22 Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)