Allow Boolean reloptions to have ternary values

Álvaro Herrera <alvherre@kurilemu.de>

Commit: 4d6a66f675815a5d40a650d4dcfb5ddb89c6ad2f
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: 2026-01-21T19:06:01Z
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

Files

Discussion