diff options
author | Fujii Masao <fujii@postgresql.org> | 2019-05-08 02:10:33 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2019-05-08 02:10:33 +0900 |
commit | b84dbc8eb80b43e554891c459a19969d9fbdefe5 (patch) | |
tree | 3005b4dc1ca54c9ce9fd3c2d24b69ec12b680111 /src/include/commands | |
parent | 98719af6c2e30d538cd05cfe044f58ba4067b52b (diff) | |
download | postgresql-b84dbc8eb80b43e554891c459a19969d9fbdefe5.tar.gz postgresql-b84dbc8eb80b43e554891c459a19969d9fbdefe5.zip |
Add TRUNCATE parameter to VACUUM.
This commit adds new parameter to VACUUM command, TRUNCATE,
which specifies that VACUUM should attempt to 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 parameter, if specified, overrides the vacuum_truncate
reloption. If neither the reloption nor the VACUUM option is
used, the default is true, as before.
Author: Fujii Masao
Reviewed-by: Julien Rouhaud, Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoD+qtrSDL=GSma4Wd3kLYLeRC0hPna-YAdkDeV4z156vg@mail.gmail.com
Diffstat (limited to 'src/include/commands')
-rw-r--r-- | src/include/commands/vacuum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 9cc6e0d0235..270f61b0832 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -182,6 +182,8 @@ typedef struct VacuumParams * to use default */ VacOptTernaryValue index_cleanup; /* Do index vacuum and cleanup, * default value depends on reloptions */ + VacOptTernaryValue truncate; /* Truncate empty pages at the end, + * default value depends on reloptions */ } VacuumParams; /* GUC parameters */ |