public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Tom Lane <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: pgsql: Add vacuum_truncate configuration parameter.
Date: Thu, 20 Mar 2025 08:39:53 -0700
Message-ID: <CAKFQuwbA6-fXn6w5mS_k5_UOS67+0ogt_FyjpbXFnQaAPm98bA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Thursday, March 20, 2025, Tom Lane <[email protected]> wrote:

> Nathan Bossart <[email protected]> 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.


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: Add vacuum_truncate configuration parameter.
  In-Reply-To: <CAKFQuwbA6-fXn6w5mS_k5_UOS67+0ogt_FyjpbXFnQaAPm98bA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox