pgsql: Allow VACUUM to be run with index cleanup disabled.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow VACUUM to be run with index cleanup disabled.
Date: 2019-04-04 19:05:14
Message-ID: E1hC7fm-0008Lw-Sq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow VACUUM to be run with index cleanup disabled.

This commit adds a new reloption, vacuum_index_cleanup, which
controls whether index cleanup is performed for a particular
relation by default. It also adds a new option to the VACUUM
command, INDEX_CLEANUP, which can be used to override the
reloption. If neither the reloption nor the VACUUM option is
used, the default is true, as before.

Masahiko Sawada, reviewed and tested by Nathan Bossart, Alvaro
Herrera, Kyotaro Horiguchi, Darafei Praliaskouski, and me.
The wording of the documentation is mostly due to me.

Discussion: http://postgr.es/m/CAD21AoAt5R3DNUZSjOoXDUY=naYPUOuffVsRzuTYMz29yLzQCA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a96c41feec6b6616eb9d5baee9a9e08c20533c38

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml | 15 ++++++
doc/src/sgml/ref/vacuum.sgml | 23 ++++++++
src/backend/access/common/reloptions.c | 13 ++++-
src/backend/access/heap/vacuumlazy.c | 97 ++++++++++++++++++++++++++--------
src/backend/commands/vacuum.c | 28 ++++++++++
src/backend/postmaster/autovacuum.c | 1 +
src/bin/psql/tab-complete.c | 6 ++-
src/include/commands/vacuum.h | 15 ++++++
src/include/utils/rel.h | 1 +
src/test/regress/expected/vacuum.out | 9 ++++
src/test/regress/sql/vacuum.sql | 10 ++++
11 files changed, 193 insertions(+), 25 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-04-04 19:13:12 pgsql: Make queries' locking of indexes more consistent.
Previous Message Peter Geoghegan 2019-04-04 16:40:12 pgsql: Invalidate binary search bounds consistently.