pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add option PROCESS_TOAST to VACUUM
Date: Tue, 09 Feb 2021 05:17:57 +0000
Message-ID: <E1l9LPR-0005JP-RJ@gemulon.postgresql.org> (raw)

Add option PROCESS_TOAST to VACUUM

This option controls if toast tables associated with a relation are
vacuumed or not when running a manual VACUUM.  It was already possible
to trigger a manual VACUUM on a toast relation without processing its
main relation, but a manual vacuum on a main relation always forced a
vacuum on its toast table.  This is useful in scenarios where the level
of bloat or transaction age of the main and toast relations differs a
lot.

This option is an extension of the existing VACOPT_SKIPTOAST that was
used by autovacuum to control if toast relations should be skipped or
not.  This internal flag is renamed to VACOPT_PROCESS_TOAST for
consistency with the new option.

A new option switch, called --no-process-toast, is added to vacuumdb.

Author: Nathan Bossart
Reviewed-by: Kirk Jamison, Michael Paquier, Justin Pryzby
Discussion: https://postgr.es/m/BA8951E9-1524-48C5-94AF-73B1F0D7857F@amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7cb3048f38e26b39dd5fd412ed8a4981b6809b35

Modified Files
--------------
doc/src/sgml/ref/vacuum.sgml         | 15 +++++++++++++++
doc/src/sgml/ref/vacuumdb.sgml       | 15 +++++++++++++++
src/backend/commands/vacuum.c        | 17 ++++++++++++++---
src/backend/postmaster/autovacuum.c  |  5 +++--
src/bin/psql/tab-complete.c          |  5 +++--
src/bin/scripts/t/100_vacuumdb.pl    | 19 +++++++++++++------
src/bin/scripts/vacuumdb.c           | 28 ++++++++++++++++++++++++++++
src/include/commands/vacuum.h        |  2 +-
src/test/regress/expected/vacuum.out |  6 ++++++
src/test/regress/sql/vacuum.sql      |  6 ++++++
10 files changed, 104 insertions(+), 14 deletions(-)



Message-ID: <E1l9LPR-0005JP-RJ@gemulon.postgresql.org>
Permalink:  ../E1l9LPR-0005JP-RJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l9LPR-0005JP-RJ@gemulon.postgresql.org

 · 

reply

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: michael@paquier.xyz
  Subject: Re: pgsql: Add option PROCESS_TOAST to VACUUM
  In-Reply-To: <E1l9LPR-0005JP-RJ@gemulon.postgresql.org>
  References: <E1l9LPR-0005JP-RJ@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