public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: [email protected]
Subject: pgsql: Add vacuum_truncate configuration parameter.
Date: Thu, 20 Mar 2025 15:17:09 +0000
Message-ID: <[email protected]> (raw)
Add vacuum_truncate configuration parameter.
This new parameter works just like the storage parameter of the
same name: if set to true (which is the default), autovacuum and
VACUUM attempt to truncate any empty pages at the end of the table.
It is primarily intended to help users avoid locking issues on hot
standbys. The setting can be overridden with the storage parameter
or VACUUM's TRUNCATE option.
Since there's presently no way to determine whether a Boolean
storage parameter is explicitly set or has just picked up the
default value, this commit also introduces an isset_offset member
to relopt_parse_elt.
Suggested-by: Will Storey <[email protected]>
Author: Nathan Bossart <[email protected]>
Co-authored-by: Gurjeet Singh <[email protected]>
Reviewed-by: Laurenz Albe <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Reviewed-by: Robert Treat <[email protected]>
Discussion: https://postgr.es/m/Z2DE4lDX4tHqNGZt%40dev.null
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0164a0f9ee12e0eff9e4c661358a272ecd65c2d4
Modified Files
--------------
doc/src/sgml/config.sgml | 29 +++++++++++++++++++++++++++
doc/src/sgml/ref/create_table.sgml | 13 ++++--------
doc/src/sgml/ref/vacuum.sgml | 3 ++-
src/backend/access/common/reloptions.c | 14 ++++++++++++-
src/backend/commands/vacuum.c | 17 ++++++++++++----
src/backend/utils/misc/guc_tables.c | 10 +++++++++
src/backend/utils/misc/postgresql.conf.sample | 4 ++++
src/include/access/reloptions.h | 1 +
src/include/commands/vacuum.h | 1 +
src/include/utils/guc_tables.h | 1 +
src/include/utils/rel.h | 1 +
src/test/regress/expected/vacuum.out | 27 +++++++++++++++++++++++++
src/test/regress/sql/vacuum.sql | 10 +++++++++
13 files changed, 116 insertions(+), 15 deletions(-)
view thread (6+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Add vacuum_truncate configuration parameter.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox