summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorNathan Bossart2025-03-20 15:16:50 +0000
committerNathan Bossart2025-03-20 15:16:50 +0000
commit0164a0f9ee12e0eff9e4c661358a272ecd65c2d4 (patch)
treeadc03a29d38053e20cf598d579a8717f16b21212 /src/include/commands
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 'src/include/commands')
-rw-r--r--src/include/commands/vacuum.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index baacc63f590..bc37a80dc74 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -304,6 +304,7 @@ extern PGDLLIMPORT int vacuum_multixact_freeze_table_age;
extern PGDLLIMPORT int vacuum_failsafe_age;
extern PGDLLIMPORT int vacuum_multixact_failsafe_age;
extern PGDLLIMPORT bool track_cost_delay_timing;
+extern PGDLLIMPORT bool vacuum_truncate;
/*
* Relevant for vacuums implementing eager scanning. Normal vacuums may