summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/vacuum.sgml
diff options
context:
space:
mode:
authorNathan Bossart2025-03-20 15:16:50 +0000
committerNathan Bossart2025-03-20 15:16:50 +0000
commit0164a0f9ee12e0eff9e4c661358a272ecd65c2d4 (patch)
treeadc03a29d38053e20cf598d579a8717f16b21212 /doc/src/sgml/ref/vacuum.sgml
parent618c64ffd3967cb5313b4b11e1e1043a074f2139 (diff)
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
Diffstat (limited to 'doc/src/sgml/ref/vacuum.sgml')
-rw-r--r--doc/src/sgml/ref/vacuum.sgml3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml
index 971b1237d47..bd5dcaf86a5 100644
--- a/doc/src/sgml/ref/vacuum.sgml
+++ b/doc/src/sgml/ref/vacuum.sgml
@@ -265,7 +265,8 @@ VACUUM [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <re
truncate off any empty pages at the end of the table and allow
the disk space for the truncated pages to be returned to
the operating system. This is normally the desired behavior
- and is the default unless the <literal>vacuum_truncate</literal>
+ and is the default unless <xref linkend="guc-vacuum-truncate"/>
+ is set to false or the <literal>vacuum_truncate</literal>
option has been set to false for the table to be vacuumed.
Setting this option to false may be useful to avoid
<literal>ACCESS EXCLUSIVE</literal> lock on the table that