| From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Ensure TOAST storage parameters have unsettable defaults. |
| Date: | 2026-08-21 16:52:03 |
| Message-ID: | E1wxSTK-00000001XIe-2910@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)paquier(dot)xyz>
Reviewed-by: Sami Imseih <samimseih(at)gmail(dot)com>
Reviewed-by: Greg Burd <greg(at)burd(dot)me>
Tested-by: solai v <solai(dot)cdac(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-08-21 18:43:35 | pgsql: Move the StdRdOptions parse table to file scope. |
| Previous Message | Peter Eisentraut | 2026-08-21 12:15:47 | pgsql: Fix error code for null FOR PORTION OF target |