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.96) (envelope-from ) id 1vgrkg-005jmW-2Y for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jan 2026 21:53:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgrke-005D4v-36 for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jan 2026 21:53:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgrke-005D4n-2A for pgsql-hackers@lists.postgresql.org; Fri, 16 Jan 2026 21:53:04 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgrkc-000p9v-1n for pgsql-hackers@lists.postgresql.org; Fri, 16 Jan 2026 21:53:04 +0000 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-7cfd819ae5eso1250915a34.1 for ; Fri, 16 Jan 2026 13:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768600382; x=1769205182; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=t+DPUcW6U92DgpYVizwUbQTXS+kka9dEbXnmK8Kh5ao=; b=LGYXXrHce+eZJ8l7q/tswwWClxEaouSWTa4XET+2x9CrZ3J2R/MF0naGNCxhTRBvrZ 4Y/OowKpIKYHzk1XN9hu9KLSV86VtW0pA0KlTC2Z170npsJXuBOe9/EdPCFJgTN2YpRe p6JObj+GMs/itZgC+AGXd8b3FY/IEoxRrTSPEvs98dbt/caORrTe0b8c9nxbshk+Bpn4 CuzpHT9bvF7gr9pPEZqA8POeEDrHGGBzpuhxLoDRpo3TKNfqsypDKroC8u44ot97Ie1t aERSSR8L8CEeJ8inH5Ega0PQsiisCi+7t9LHGVCUCoBR4Q8t4ls2Q8/O7ugfGcx4F9PG 5MHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768600382; x=1769205182; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t+DPUcW6U92DgpYVizwUbQTXS+kka9dEbXnmK8Kh5ao=; b=cYr3g+qb+2bdVauej93i++PCSNX3KYzsgSBYCFfqQ1PF50MUokrFO42x9hE6APD0JE E1tB2MAfxRbdFoloW1bn8NLAkdgIM5Tq1Bme/v6l/YfgsF4pLHTtLaU3CPo1dDASieH1 Jy+F2+sQDRfXaDImA66GXdluEZgXttvZWHAio9mjGqJ6oB+wEQmU8o030CxsEPQf02un 3AxpnhAUzonqbGYT2FDHpMd8y831hRO0MHjY1TQd0GnzHY8jZij4Ux70PFAlzBotogDq Wj1mzUQqk0Sg6hA3x4BpUM8hq82NMp+Uoib46JuFymdEA6U4eLSHtvrvV7zJxu75qyw8 It4A== X-Forwarded-Encrypted: i=1; AJvYcCWpJHe8L7RD/P7qJPjYThpYnGDaY7Wqxbpr8uzYH7gF6RxvLz9oZu52gSz94yqAs3oUXjKMuBBVbI9372Us@lists.postgresql.org X-Gm-Message-State: AOJu0YywxaNKUHHIDS3uruo811i6w+i+lVX+7uhWlQIVFOeaUI292j47 nWVMqavWoHNjbZ0wbuTDiXmPX2iARoXdB4VlmQyOsEc9Gk2XNDvHFNow X-Gm-Gg: AY/fxX7XSdcvlM4kho5XCzfsCe+lazU+XlnfJIk+SZXFOp/av18LDNn5drwWahe/5p/ QPWVrCJ+/CVDOIoOc9KAMzXvDP4lmkjEmlQjUR9Oo6hNTRtt279M7IKXHRc2vF6ecEv7pB36Pqq IlsSA8DNuysWfQ5JT5+/BmevP90RyCxTSl6opXN0EgIo4YpnM/vLACIr9KKJ0XjsB7LS20xfHrw SlNR4uFPxQyP+eI435LJGX2eDOkWNqUCVtfHHV5A6G7WMXph3Wacpm+j1vf4fvzlBDcv9NZlRL6 iATgxh924Rvzib3STa0zx+2OxNg8M8+sr2BOw312lzsnXVMiSJKwxBgdhce86IgJvyKVfk4OCJk /MYU3HvaM3LdohXUDwPP7frDCqPs6vHE9itV5z/FIzexqivr64a2KE/bdPlxu1edStxsbwp9+l3 YtEdSIR0GinfigUlX+I9GqHANjnC9hKoNDbs2xRYfI10DjpqRQM0i3h/hKnIuiQuXI9jT+fUlKp ZkIdUpjtA== X-Received: by 2002:a05:6830:7304:b0:7c7:b4e:edb4 with SMTP id 46e09a7af769-7cfded311d9mr2543171a34.8.1768600382299; Fri, 16 Jan 2026 13:53:02 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7cfdf2a5913sm2401283a34.22.2026.01.16.13.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jan 2026 13:53:01 -0800 (PST) Date: Fri, 16 Jan 2026 15:52:59 -0600 From: Nathan Bossart To: =?utf-8?Q?=C3=81lvaro?= Herrera Cc: Nikolay Shaplov , PostgreSQL Hackers , Chris Travers , Timur Magomedov Subject: Re: [PATCH] ternary reloption type Message-ID: References: <4047390.3Lj2Plt8kZ@thinkpad-pgpro> <202601161509.54de2afpgxpp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202601161509.54de2afpgxpp@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 16, 2026 at 04:14:52PM +0100, Álvaro Herrera wrote: > I'm CCing Nathan as committer of the vacuum_truncate_set stuff which > Nikolay so strongly disliked. Any objections to going with this > approach? Looks generally reasonable. > This could also be used for other options such as `vacuum_index_cleanup` > and `buffering`, but lets get the scaffolding in first. Part of me wonders if we should just modify the Boolean relopt implementation instead of using ternary only when needed. > + parsed = parse_bool(value, &b); > + option->values.ternary_val = b ? TERNARY_TRUE : TERNARY_FALSE; > + if (validate && !parsed) > + ereport(ERROR, > + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > + errmsg("invalid value for ternary option \"%s\": %s", > + option->gen->name, value))); Shouldn't this say "invalid value for boolean option"? IIUC the intent is for ternary to be exactly like bool, except it defaults to an "unset" value that can't be chosen by the user. In that sense, I think "ternary" is kind of a misnomer, but I wouldn't count this as an objection. -- nathan