Re: proposal: a validator for configuration files

From: Alexey Klyukin <alexk(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: 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-05-13 22:49:31
Message-ID: 845BBDD2-04A6-424A-9359-A3E6795E5356@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Apr 14, 2011, at 9:50 PM, Robert Haas wrote:

> On Mon, Apr 4, 2011 at 2:03 PM, Alexey Klyukin <alexk(at)commandprompt(dot)com> wrote:
>> Here's the update of Selena's patch, which also shows all errors in
>> configuration parameters (as well as parser errors) during reload.
>
> You should add this here:
>
> https://commitfest.postgresql.org/action/commitfest_view/open
>
> On a quick glance, this patch appears to contain some superfluous
> hunks where you changed whitespace or variable names. You might want
> to remove those and repost before adding to the CF app. Also, some
> submission notes would be very helpful - when you send in the revised
> version, detail in the email the exact purpose of the changes so that
> someone can review the patch without having to read this thread and
> all preceding threads in their entirety.

Thank you for the feedback, I've updated the patch, attached is a new version.
I'll add it to the commitfest after posting this message.

The patch forces the parser to report all errors (max 100) from the
ProcessConfigFile/ParseConfigFp. Currently, only the first parse error or an
invalid directive is reported. Reporting all of them is crucial to automatic
validation of postgres config files.

This patch is based on the one submitted earlier by Selena Deckelmann:
http://archives.postgresql.org/pgsql-hackers/2009-03/msg00345.php

It incorporates suggestions by Tom Lane for avoiding excessive bloat in logs
in case there is a junk instead of postgresql.conf.
http://archives.postgresql.org/pgsql-hackers/2009-03/msg01142.php

Regards,
--
Alexey Klyukin
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
parser_continue_on_errors.diff application/octet-stream 5.3 KB
unknown_filename text/plain 1 byte

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2011-05-13 23:04:47 Re: Double ocurring Subplan
Previous Message Cédric Villemain 2011-05-13 22:34:24 Re: the big picture for index-only scans