Add vacuum_truncate reloption.
authorFujii Masao <fujii@postgresql.org>
Mon, 8 Apr 2019 07:43:57 +0000 (16:43 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 8 Apr 2019 07:43:57 +0000 (16:43 +0900)
commit119dcfad988d5b5d9f52b256087869997670aa36
treebccfad60d80210a208cadb93c02f89764436fb01
parente3865c37544d77bd4205dd5361592797b97d1e93
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
doc/src/sgml/ref/create_table.sgml
src/backend/access/common/reloptions.c
src/backend/access/heap/vacuumlazy.c
src/bin/psql/tab-complete.c
src/include/utils/rel.h
src/test/regress/expected/reloptions.out
src/test/regress/sql/reloptions.sql