From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow Boolean reloptions to have ternary values
Date: Wed, 21 Jan 2026 19:07:57 +0000
Message-ID: <E1vidYa-001qhJ-11@gemulon.postgresql.org> (raw)
Allow Boolean reloptions to have ternary values
From the user's point of view these are just Boolean values; from the
implementation side we can now distinguish an option that hasn't been
set. Reimplement the vacuum_truncate reloption using this type.
This could also be used for reloptions vacuum_index_cleanup and
buffering, but those additionally need a per-option "alias" for the
state where the variable is unset (currently the value "auto").
Author: Nikolay Shaplov <dhyan@nataraj.su>
Reviewed-by: Timur Magomedov <t.magomedov@postgrespro.ru>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://postgr.es/m/3474141.usfYGdeWWP@thinkpad-pgpro
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4d6a66f675815a5d40a650d4dcfb5ddb89c6ad2f
Modified Files
--------------
src/backend/access/common/reloptions.c | 138 +++++++++++++++++----
src/backend/commands/vacuum.c | 4 +-
src/include/access/reloptions.h | 26 ++--
src/include/postgres.h | 14 +++
src/include/utils/rel.h | 3 +-
src/test/modules/dummy_index_am/README | 2 +-
src/test/modules/dummy_index_am/dummy_index_am.c | 55 +++++---
.../modules/dummy_index_am/expected/reloptions.out | 24 +++-
src/test/modules/dummy_index_am/sql/reloptions.sql | 10 ++
src/test/regress/expected/reloptions.out | 18 +++
src/test/regress/sql/reloptions.sql | 11 ++
src/tools/pgindent/typedefs.list | 2 +
12 files changed, 242 insertions(+), 65 deletions(-)
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: pgsql-committers@postgresql.org
Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow Boolean reloptions to have ternary values
In-Reply-To: <E1vidYa-001qhJ-11@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox