Re: pgsql: Add vacuum_truncate configuration parameter.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: pgsql: Add vacuum_truncate configuration parameter.
Дата
Msg-id CAKFQuwbA6-fXn6w5mS_k5_UOS67+0ogt_FyjpbXFnQaAPm98bA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add vacuum_truncate configuration parameter.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Thursday, March 20, 2025, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Nathan Bossart <nathan@postgresql.org> writes:
> Since there's presently no way to determine whether a Boolean
> storage parameter is explicitly set or has just picked up the
> default value, this commit also introduces an isset_offset member
> to relopt_parse_elt.

Uh, what?  Why is it a good idea to distinguish those states?
Seems like that risks some very surprising behavior, ie if the
default is "true", why shouldn't that act exactly like an
explicit setting of "true"?

In order to implement what amounts to coalesce(…) for settings (use global value unless the table value overrides) one needs a sentinel value that means unset because settings cannot take on the null value.  There is no such possible sentinel value for boolean so another field is required.  The hazards of choosing Boolean instead of text for settings.

David J.

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