mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user