Re: Allow commenting of variables in postgresql.conf to -

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org, bruce(at)momjian(dot)us, Joachim Wieland <joe(at)mcknight(dot)de>
Subject: Re: Allow commenting of variables in postgresql.conf to -
Date: 2006-08-07 15:28:53
Message-ID: 44D75C35.3040502@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-08-07 15:31:19 Re: Simplifying "standby mode"
Previous Message Mark Wong 2006-08-07 15:26:17 AOL Research open-research

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2006-08-07 15:31:19 Re: Simplifying "standby mode"
Previous Message Tom Lane 2006-08-07 13:48:14 Simplifying "standby mode"