Re: proposal: a validator for configuration files - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: proposal: a validator for configuration files
Date
Msg-id 7F01EAE3-82C2-454F-BA0B-6168C636C616@phlo.org
Whole thread Raw
In response to Re: proposal: a validator for configuration files  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: proposal: a validator for configuration files
List pgsql-hackers
On Jul14, 2011, at 01:38 , Alvaro Herrera wrote:
> One strange thing here is that you could get two such messages; say if a
> file has 100 parse errors and there are also valid lines that contain
> bogus settings (foo = bar).  I don't find this to be too problematic,
> and I think fixing it would be excessively annoying.
>
> For example, a bogus run would end like this:
>
> 95 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 4, near end of line
> 96 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 41, near end of line
> 97 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 104, near end of line
> 98 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 156, near end of line
> 99 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 208, near end of line
> 100 LOG:  syntax error in file "/pgsql/install/HEAD/data/postgresql.conf" line 260, near end of line
> 101 LOG:  too many errors found, stopped processing file "/pgsql/install/HEAD/data/postgresql.conf"
> 102 LOG:  unrecognized configuration parameter "plperl.err"
> 103 LOG:  unrecognized configuration parameter "this1"
> 104 LOG:  too many errors found, stopped processing file "/pgsql/install/HEAD/data/postgresql.conf"
> 105 FATAL:  errors detected while parsing configuration files

How about changing ParseConfigFile to say "too many *syntax* error found"
instead? It'd be more precise, and we wouldn't emit exactly the
same message twice.

Do you want me to take a closer look at your modified version of the
patch before you commit, or did you post it more as a "FYI, this is
how it's going to look like"?

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Need help understanding pg_locks
Next
From: Florian Pflug
Date:
Subject: Re: spinlock contention