Re: Prevent conflicting SET options from being set

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Prevent conflicting SET options from being set
Дата
Msg-id 19769.1111418970@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Prevent conflicting SET options from being set  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> In this design, our ability to check the conflicting SET or give suggestions
> is contributed by SQL's functionality. This is good I think.

This is out of the question, because we have to be able to execute SET
in environments where we don't have database access nor the ability to
run transactions (eg, postmaster startup).  Nor is it obvious that SQL
is the most useful language to make such checks in anyway.  For instance
a SQL command wouldn't have access to internal backend state, which it
might need to decide if a setting is valid.

We already have the ability to issue custom messages in assign_hooks,
and I think that's sufficient in practice.

A bigger problem with making cross-variable validity checks is that you
can't really do it per-variable without falling foul of ordering
considerations.  For instance, the existing checks in
assign_stage_log_stats and assign_log_stats are ill-considered because
they may reject a postgresql.conf file that turns one variable on before
turning the other off.
        regards, tom lane


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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Prevent conflicting SET options from being set
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Very strange query difference between 7.3.6 and 7.4.6