Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files - Mailing list pgsql-hackers

From Amir Rohan
Subject Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files
Date
Msg-id 561E981A.5030409@zoho.com
Whole thread Raw
In response to Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
 IOn 10/14/2015 08:45 PM, Alvaro Herrera wrote:
> Amir Rohan wrote:
> 
>> it does fail the "dependent options" test:
>> $ postgres -C "archive_mode"
>> on
>> $ postgres -C wal_level
>> minimal
>>
>> no errors, great, let's try it:
>> $ pg_ctl restart
>>
>> FATAL:  WAL archival cannot be enabled when wal_level is "minimal"
> 
> This complaint could be fixed we had a --check-config that runs the
> check hook for every variable, I think.  I think that closes all the
> syntax checks you want; then your tool only needs to worry about
> semantic checks, and can obtain the values by repeated application of -C
> <param> (or, more conveniently, have a new -C mode that takes no args
> and prints the names and values for all parameters).
> 

That sounds reasonable and convenient. It's important to have one
tool that covers everything, so I'd have to call "-C" and parse
the errors, but that seems possible.

If there was a flag which produced something more like the output of the
pg_settings view in a structured format, as well as the errors, that
would be ideal. And possibly useful for other tool building.
Would such a thing be contrary to the pg spirit?

Amir




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Can extension build own SGML document?
Next
From: Robert Haas
Date:
Subject: Re: Foreign join pushdown vs EvalPlanQual