pgsql: Add vacuum_truncate reloption.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add vacuum_truncate reloption.
Date: 2019-04-08 07:46:33
Message-ID: E1hDOzB-0000pO-ED@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-04-08 11:49:51 pgsql: doc: Add note about generated columns in foreign tables
Previous Message Michael Paquier 2019-04-08 06:36:57 pgsql: Tweak wording of documentation for pg_checksums