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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Robert Haas-5
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@...

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