Re: guc comment changes (was Re: Getting a move on for 8.2 beta)

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: guc comment changes (was Re: Getting a move on for 8.2 beta)
Дата
Msg-id 20060918113524.GA3425@mcknight.de
обсуждение исходный текст
Ответ на Re: guc comment changes (was Re: Getting a move on for 8.2 beta)  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: guc comment changes (was Re: Getting a move on for 8.2 beta)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Sep 18, 2006 at 01:13:45PM +0200, Peter Eisentraut wrote:
> Joachim Wieland is in the process of reworking the original feature patch 
> (resetting commented out parameters) in a much more compact form.  But it 
> turns out that there are a couple of very tricky situations involving custom 
> variables, which may need more discussion than we have time for now.

The problem with custom variables is the definition of their default value.
First I defined it to be "variable does not exist" and tried to have a close
analogy to what happens on set/set local/reset with normal variables.
However that means that custom variables have to vanish (where other
variables show their default value) and revive (where other variables show a
changed value). For example if you have:

begin;
savepoint a;
set foo.var to 3;
(here we delete foo.var from the configuration file and send SIGHUP)
savepoint b;
reset foo.var;

There seem to exist quite a few possible definitions as to what happens if you
run "show foo.var" after the "reset" directly or after rolling back to the
savepoints a and b.

The result of the discussion with Peter was that all that seems not worth
doing since it is a rare special case. In the current form of the patch if you
delete a custom variable from the configuration file it gets deleted
internally and all reference to it results in error. There is still one
special case which is:

begin;
set foo.var to 3;
(here we delete foo.var from the configuration file and send SIGHUP)
commit;

This transaction will fail because commit cannot change the value of the
variable to 3 as requested by the user.

I have the patch almost ready in the described form, if there is any chance
it will make it into 8.2 I will clean it up and post it ASAP but Peter wrote
me that chances are close to zero and so I stopped working on it for now.


Joachim

-- 
Joachim Wieland                                              joe@mcknight.de
             GPG key available
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gevik Babakhani
Дата:
Сообщение: Re: Opinion about macro for the uuid datatype.
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Reducing data type space usage