Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail - Mailing list pgsql-hackers

From Selena Deckelmann
Subject Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail
Date
Msg-id 49B6797C.4020600@endpoint.com
Whole thread Raw
In response to Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Hi!

Simon Riggs wrote:
> On Sun, 2009-03-08 at 16:27 -0700, Selena Deckelmann wrote:
>> ParseConfigFile currently exits on the first parsing error. Changed
>> guc_file.l to report all parsing errors before exiting:
>> * Moved parse_error: block inside while() loop
>> * Removed cleanup_exit: and associated 'goto'
>> * Added ereport if ParseConfigFile() returns false
>> * changed OK to ok ;)
>> * Added comment - TODO: Report bogus variables in addition to parsing
>> errors before bailing out
>
> These are very good changes, good news.

Thanks :)

> Is it possible to check for parameters that have been changed, yet will
> not be applied at reload?

This was already implemented! :) For example:

LOG:  attempted change of parameter "shared_buffers" ignored
DETAIL:  This parameter cannot be changed after server start.
LOG:  attempted change of parameter "max_prepared_transactions" ignored
DETAIL:  This parameter cannot be changed after server start.

A thing that could be added, however, is reporting of all invalid (as 
opposed to valid, but requires a restart to apply) parameters before 
exiting. This change requires refactoring ProcessConfigFile() more 
significantly, as the parsing and validity checks are done separately, 
and are exited with gotos. :)

I haven't tried to change this yet, but was planning to.

-selena


-- 
Selena Deckelmann
End Point Corporation


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Prepping to break every past release...
Next
From: David Fetter
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1704)