From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add vacuum_truncate reloption.
Date: Mon, 08 Apr 2019 07:46:33 +0000
Message-ID: <E1hDOzB-0000pO-ED@gemulon.postgresql.org> (raw)
Add vacuum_truncate reloption.
vacuum_truncate controls whether vacuum tries to truncate off
any empty pages at the end of the table. Previously vacuum always
tried to do the truncation. However, the truncation could cause
some problems; for example, ACCESS EXCLUSIVE lock needs to
be taken on the table during the truncation and can cause
the query cancellation on the standby even if hot_standby_feedback
is true. Setting this reloption to false can be helpful to avoid
such problems.
Author: Tsunakawa Takayuki
Reviewed-By: Julien Rouhaud, Masahiko Sawada, Michael Paquier, Kirk Jamison and Fujii Masao
Discussion: https://postgr.es/m/CAHGQGwE5UqFqSq1=kV3QtTUtXphTdyHA-8rAj4A=Y+e4kyp3BQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/119dcfad988d5b5d9f52b256087869997670aa36
Modified Files
--------------
doc/src/sgml/ref/create_table.sgml | 15 ++++++++++
src/backend/access/common/reloptions.c | 18 +++++++++++-
src/backend/access/heap/vacuumlazy.c | 12 +++++---
src/bin/psql/tab-complete.c | 2 ++
src/include/utils/rel.h | 1 +
src/test/regress/expected/reloptions.out | 47 ++++++++++++++++++++++++++++++++
src/test/regress/sql/reloptions.sql | 22 +++++++++++++++
7 files changed, 112 insertions(+), 5 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 vacuum_truncate reloption.
In-Reply-To: <E1hDOzB-0000pO-ED@gemulon.postgresql.org>
References: <E1hDOzB-0000pO-ED@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