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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to