From: | Alexey Klyukin <alexk(at)commandprompt(dot)com> |
---|---|
To: | Florian Pflug <fgp(at)phlo(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Selena Deckelmann <selena(at)chesnok(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: a validator for configuration files |
Date: | 2011-06-16 20:34:49 |
Message-ID: | 1CB981C4-18BD-41EE-9703-26DF4CBF3593@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Jun 16, 2011, at 9:18 PM, Florian Pflug wrote:
> On Jun16, 2011, at 20:14 , Alexey Klyukin wrote:
>>
>> Well, while thinking about this I decided to leave the counter for the ParseConfigFp, but
>> drop it in ProcessConfigFile. The case we are protecting against is a single file full of junk.
>> It's unlikely that this junk would contain include directives with valid file paths, neither it's
>> likely to find a file with a correct syntax, but full of invalid directives.
>
> Sounds good.
Attached is the v2 of the patch to show all parse errors at postgresql.conf.
Changes (per review and suggestions from Florian):
- do not stop on the first error during postmaster's start.
- fix errors in processing files from include directives.
- show only a single syntax error per line, i.e. fast forward to the EOL after coming across the first one.
- additional comments/error messages, code cleanup
Questions:
- Should we add a comment for the changes in guc.c? I think the existing ones are still valid, but they might be harder go grasp, given that we've removed PGC_SIGHUP from the condition.
- The error message that we emit when the parsing is unsuccessful, will it cause incompatibility w/ 3rd party tools, which may, in theory, show only one error message (would it better to show the first error instead, as proposed by Florian?).
I'd appreciate your comments and suggestions.
Thank you,
Alexey.
--
Command Prompt, Inc. http://www.CommandPrompt.com
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Attachment | Content-Type | Size |
---|---|---|
parser_continue_on_errors_v2.diff | application/octet-stream | 8.0 KB |
unknown_filename | text/plain | 1 byte |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-06-16 20:50:38 | Re: gcc 4.6 -Wunused-but-set-variable |
Previous Message | Heikki Linnakangas | 2011-06-16 20:27:00 | Re: Nested CASE-WHEN scoping |