Re: postgresql.auto.conf comments

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.auto.conf comments
Date: 2014-11-25 03:36:32
Message-ID: CAA4eK1+=ovYQqYGHcX2OBU3mk+hSHjFDpvmrHCos1Vgj8_b6vg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 25, 2014 at 1:56 AM, Thom Brown <thom(at)linux(dot)com> wrote:
>
> Hi,
>
> I haven't seen this mentioned anywhere (although it may have as I haven't
read through the entire history of it), but would others find it useful to
have ALTER SYSTEM support comments?
>
> e.g.
>
> ALTER SYSTEM SET autovacuum_vacuum_scale_factor = 0.01
> WITH [ INLINE | HEADLINE ] COMMENT $As most of the tables on the system
are so big, we're setting this parameter lower than the default to keep
bloat under more control.$;
>
> I just made up inline and headline to suggest that we could allow either:
>
> autovacuum_vacuum_scale_factor = 0.01 # As most of the tables...
>
> and
>
> # As most of the tables on the system are so big, we're setting this
parameter
> # lower than the default to keep bloat under more control.
> autovacuum_vacuum_scale_factor = 0.01
>

I think the biggest hurdle to achieve this is to enhance/implement
the parser for it, right now the function to parse config file
(ParseConfigFp()) gives us the list of name-value pair item's. I think
if we could improve it or write a different function which can return
name-value-comment item's, then it won't be too difficult for
Alter System to support it.

>
> The rationale being that it's often the case one wants to document the
reason for a parameter being configured so, but there's no way of doing
this for settings in postgresql.auto.conf as they'll be wiped out if added
manually.
>

I think this is completely genuine request and I have seen that other
systems which support Alter System does support comments along
with each entry.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-11-25 03:36:51 New wal format distorts pg_xlogdump --stats
Previous Message Etsuro Fujita 2014-11-25 02:22:04 Re: postgres_fdw behaves oddly