From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ensure TOAST storage parameters have unsettable defaults.
Date: Fri, 21 Aug 2026 16:52:03 +0000
Message-ID: <E1wxSTK-00000001XIe-2910@gemulon.postgresql.org> (raw)
Ensure TOAST storage parameters have unsettable defaults.
A follow-up commit will teach autovacuum and manual VACUUM to fill
in a TOAST table's unset storage parameters from its main table's.
To be able to determine whether a parameter is set, it must default
to a value that users cannot set. Of all the parameters that can
be set on TOAST tables, log_autovacuum_min_duration is the only one
that violates this rule. This commit changes its default to -2 so
that we can tell whether it is set. This shouldn't produce any
user-visible behavior changes.
While at it, add assertions to ensure all storage parameters that
can be set on TOAST tables continue to follow this rule.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Greg Burd <greg@burd.me>
Tested-by: solai v <solai.cdac@gmail.com>
Discussion: https://postgr.es/m/aFRxC1W_kZU9OjJ9%40nathan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/63979e5bea14c533dadc8f44cee0ec7a2899ccf5
Modified Files
--------------
src/backend/access/common/reloptions.c | 76 +++++++++++++++++++++++++++++++++-
src/backend/postmaster/autovacuum.c | 2 +-
2 files changed, 76 insertions(+), 2 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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure TOAST storage parameters have unsettable defaults.
In-Reply-To: <E1wxSTK-00000001XIe-2910@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