Re: Allow commenting of variables in postgresql.conf to - - Mailing list pgsql-patches

From Zdenek Kotala
Subject Re: Allow commenting of variables in postgresql.conf to -
Date
Msg-id 44D75C35.3040502@sun.com
Whole thread Raw
In response to Re: Allow commenting of variables in postgresql.conf to -  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut napsal(a):
> Zdenek Kotala wrote:
>> OK. I split patch to two parts. Part one is refactoring of
>> set_config_options function. Part two implements feature "Allow
>> commenting of variables in postgresql.conf to restore them to
>> defaults".
>
> I'm having trouble wrapping my head around a code "refactoring" which
> actually makes the code significantly *longer*.  The only interface
> change I could detect is the introduction of a function
> verify_config_option(), which should just be a small variation on
> set_config_option() as it currently exists.

The main reason for refactoring was that set_config_option() was too
overloaded function and its behavior did not consistent. Old version of
set_config_function hides some messages. For example if you type:

tcp_port = 5432.1

then old implementation ignore this error without any message to log
file in the signal context (configuration reload). Main problem was that
semantic analysis of postgresql.conf is not perform in the
ProcessConfigFile function, but in the set_config_options *after*
context check. This skipped check for variables with PG_POSTMASTER
context. There was request from Joachim Wieland to add more messages
about ignored changes in the config file as well.


> I'm also about a relive a personal trauma if I see error messages like
> this:
>
>     errmsg("configuration file is invalid")
>
> I just had to deal with an unnamed product where this was all you got!

Do you have any idea for better message? This message is last one during
parsing process. What is wrong is logged before this message.



    Zdenek

pgsql-patches by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: Fixed definition of complicated errcode of ms_vc8
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Restartable Recovery