Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

From: Amir Rohan <amir(dot)rohan(at)zoho(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hacker mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files
Date: 2015-10-13 00:01:25
Message-ID: 561C49D5.7060502@zoho.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/13/2015 02:02 AM, Robert Haas wrote:
> On Fri, Oct 9, 2015 at 4:38 PM, Amir Rohan <amir(dot)rohan(at)zoho(dot)com> wrote:
>> It does catch bad syntax, but in most cases all you get is
>> "The setting could not be applied". that's not great for enums
>> or a float instead of an int. I guess a future version will fix that
>> (or not).
>
> I expect we would consider patches to improve the error messages if
> you (or someone else) wanted to propose such. But you don't have to
> want to do that.
>

>> You need a running server to run a check. You need to monkey
>> with said server's configuration in place to run a check. You must be on
>> 9.5+. The checking mechanism isn't extensible. Certainly not as easily
>> as dropping a new rule file somewhere. It doesn't check (AFAICT) for bad
>> combinations of values, for example it will tell you that you can't
>> change `wal_archive` without restart (without showing source location
>> btw, bug?), but not that you better set `wal_level` *before* you
>> restart. It doesn't do any semantic checks. It won't warn you
>> about things that are not actually an error, just a bad idea.
>
> So, I'm not saying that a config checker has no value. In fact, I
> already said the opposite. You seem to be jumping all over me here
> when all I was trying to do is explain what I think Tom was getting
> at. I *do* think that pg_file_settings is a helpful feature that is
> certainly related to what you are trying to do, but I don't think that
> it means that a config checker is useless. Fair?
>

That wasn't my intention. Perhaps I'm overreacting to a long-standing
"Tom Lane's bucket of cold water" tradition. I'm new here.
I understand your point and I was only reiterating what in particular
makes the conf checker distinctly useful IMO, and what it could
provide that pg_settings doesn't.

I've looked at parts of the pg_settings implementation and indeed some
of that code (and legwork) could be reused so the mundane parts
of writing this will be less hassle. I might have missed that if Tom and
you hadn't pointed that out.

So, Fair, and thanks.

Amir

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-10-13 00:07:37 Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Previous Message Peter Geoghegan 2015-10-12 23:54:30 Re: More work on SortSupport for text - strcoll() and strxfrm() caching