From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add TRUNCATE parameter to VACUUM.
Date: Tue, 07 May 2019 17:12:00 +0000
Message-ID: <E1hO3dI-00070d-2A@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b84dbc8eb80b43e554891c459a19969d9fbdefe5
Modified Files
--------------
doc/src/sgml/ref/create_table.sgml | 6 ++++--
doc/src/sgml/ref/vacuum.sgml | 19 +++++++++++++++++++
src/backend/access/heap/vacuumlazy.c | 13 +++++++------
src/backend/commands/vacuum.c | 13 +++++++++++++
src/backend/postmaster/autovacuum.c | 1 +
src/bin/psql/tab-complete.c | 4 ++--
src/include/commands/vacuum.h | 2 ++
src/test/regress/expected/vacuum.out | 22 ++++++++++++++++++++++
src/test/regress/sql/vacuum.sql | 11 +++++++++++
9 files changed, 81 insertions(+), 10 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Add TRUNCATE parameter to VACUUM.
In-Reply-To: <E1hO3dI-00070d-2A@gemulon.postgresql.org>
References: <E1hO3dI-00070d-2A@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox