Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tvHzz-0038TO-Sp for pgsql-committers@arkaria.postgresql.org; Thu, 20 Mar 2025 15:39:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tvHzy-003We4-Ke for pgsql-committers@arkaria.postgresql.org; Thu, 20 Mar 2025 15:39:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tvHzy-003Wdr-E1 for pgsql-committers@lists.postgresql.org; Thu, 20 Mar 2025 15:39:58 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tvHzw-0009mu-0W for pgsql-committers@lists.postgresql.org; Thu, 20 Mar 2025 15:39:58 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-2c76a1b574cso173506fac.2 for ; Thu, 20 Mar 2025 08:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742485194; x=1743089994; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=S+X+eWifR1XM/aMSj6fririy8MvmKBexPB9Le+2OT+U=; b=foa8BMEoYVD+gnCSO2qvTlXvOWZBOT3rKsngenNcldEFvnc9wa/aW3SmJfMpg+ZC/o OZZjwWxaP+jsxqw1hQNhibdYcxNmUH/Okm1pAtrcgHhcWUa2lDYe6FALGr4lR57NfN63 2ZaE5FGuBVM4kHhP4tvAl3QQPeAgNz1NaFk1s2EXeNM1nTo93bppK51px6ffdcvnnBr5 higuO6Ozup1htP0XS1D21Itq5vpSgKlDOtlRv5V73PZy8WUUiG/xJdP7+yeeRwJ9IvUz UNnJDsrYg7fxVOxR4tY3LdWAyFa1H1WnBoMNc1VGEGFYJI6BW+SLDtk9U4AKPUY66rhV MjLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742485194; x=1743089994; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S+X+eWifR1XM/aMSj6fririy8MvmKBexPB9Le+2OT+U=; b=c6QccqhDJQMTUtPoycLjsrJaPSBqJIR8Y6ox/PfM5lTqzwLjjW/GJEtRgr3DTgvRGC HkbM03cYjnT601wP/NIGO93gJ8i671rDSe8EEzdt16wr/lYMorV9ciPrH0diodX16xg6 snO8LvGrVEnrIhrPknMYangldIhHrcKi0yaGuQ4qEWxGEUBIxC3cuMHFYrvSmWJ2OCHA YIOSUXw9yvMhk5c9X1zZylio0Tg2p3qjPHETSTIA9EV0lpTRQlRLYF0ZBvTT7xwWDuXH bE+vaC1P8pZNvhfHrQFzvL4dD9e7W7+y0Q6mPtKw/lt/vLWPwJ4TLMBdIomHE1j7YKLa hoNA== X-Forwarded-Encrypted: i=1; AJvYcCUbQxpZNhjwIP5DJkEvhHHlln0J029d9bqxcuRPYosk8imtCuvAvsyZespUtkmJqsxsR8/VfwPsuR5jNNdpIS/W@lists.postgresql.org X-Gm-Message-State: AOJu0Yz2xrKg4krBoHZXDeUpP9Wbo3stLXF2ykRMhoKntLjKuBuUeOw4 O+VQKMjP5WEczVT6h1gjlaLNs3dWQjf7Xwy+gPOanX9U9aXcfwEUhbW9TzXiRYe5FS60hzcIitw 8DQgbwq7Qx2yGr8VWcSw/Den3wvRmeuqF X-Gm-Gg: ASbGncutWdqIY8XHpV9gK0KTKRQdV9HvcpORoAIHCs1qEX8J7drmPW07rNX6GiyJVK8 KU7CAhzQYvsO7WbNlI0xyDqU1zRqW0bykwYXv9ECsaJkE1FeUzZoQhxFviibvDKqKkY8zIlo4cH bglReBldqK7TKcr526cpwBgMwn X-Google-Smtp-Source: AGHT+IHLEtFU9Zmolp7gw+W5VcqQbWnjFG8g6HmdCRt/43pkFSi75iwaMJnz5XkN2+/SIcgKyuv7UjdE5wpYKcZWpRg= X-Received: by 2002:a05:6870:e308:b0:2c6:72d3:fc93 with SMTP id 586e51a60fabf-2c7454cc96amr4277879fac.12.1742485194181; Thu, 20 Mar 2025 08:39:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6802:3a0c:b0:589:13f9:e937 with HTTP; Thu, 20 Mar 2025 08:39:53 -0700 (PDT) In-Reply-To: <993142.1742484654@sss.pgh.pa.us> References: <993142.1742484654@sss.pgh.pa.us> From: "David G. Johnston" Date: Thu, 20 Mar 2025 08:39:53 -0700 X-Gm-Features: AQ5f1JpDLJrThexeeDHIHqUgBTBEzgEUDZG5VeXBPR3BdZE5YiuOWl3cFBLOb6o Message-ID: Subject: Re: pgsql: Add vacuum_truncate configuration parameter. To: Tom Lane Cc: Nathan Bossart , "pgsql-committers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000000699220630c7f36f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000699220630c7f36f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, March 20, 2025, Tom Lane wrote: > Nathan Bossart 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(=E2=80=A6) 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. --0000000000000699220630c7f36f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, March 20, 2025, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Nath= an Bossart <nathan@postgresql.o= rg> 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?=C2=A0 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 coal= esce(=E2=80=A6) for settings (use global value unless the table value overr= ides) one needs a sentinel value that means unset because settings cannot t= ake on the null value.=C2=A0 There is no such possible sentinel value for b= oolean so another field is required.=C2=A0 The hazards of choosing Boolean = instead of text for settings.

David J.
<= br>
--0000000000000699220630c7f36f--