From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use catalog query to discover tables to process in vacuumdb
Date: Tue, 29 Jan 2019 02:28:29 +0000
Message-ID: <E1goJ8X-0006Af-8h@gemulon.postgresql.org> (raw)
Use catalog query to discover tables to process in vacuumdb
vacuumdb would use a catalog query only when the command caller does not
define a list of tables. Switching to a catalog table represents two
advantages:
- Relation existence check can happen before running any VACUUM or
ANALYZE query. Before this change, if multiple relations are defined
using --table, the utility would fail only after processing the
firstly-defined ones, which may be a long some depending on the size of
the relation. This adds checks for the relation names, and does
nothing, at least yet, for the attribute names.
- More filtering options can become available for the utility user.
These options, which may be introduced later on, are based on the
relation size or the relation age, and need to be made available even if
the user does not list any specific table with --table.
Author: Nathan Bossart
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: https://postgr.es/m/FFE5373C-E26A-495B-B5C8-911EC4A41C5E@amazon.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e0c2933a767c652429ddef674622b4656fa43092
Modified Files
--------------
src/bin/scripts/common.c | 8 +-
src/bin/scripts/common.h | 3 +
src/bin/scripts/vacuumdb.c | 210 ++++++++++++++++++++++++++++++---------------
3 files changed, 147 insertions(+), 74 deletions(-)
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: Use catalog query to discover tables to process in vacuumdb
In-Reply-To: <E1goJ8X-0006Af-8h@gemulon.postgresql.org>
References: <E1goJ8X-0006Af-8h@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