Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

From: Selena Deckelmann <selena(at)endpoint(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail
Date: 2009-03-10 14:30:20
Message-ID: 49B6797C.4020600@endpoint.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-03-10 14:32:50 Re: Updates of SE-PostgreSQL 8.4devel patches (r1704)
Previous Message David Fetter 2009-03-10 14:28:59 Re: Prepping to break every past release...