From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Use catalog query to discover tables to process in vacuumdb |
Date: | 2019-01-29 02:28:29 |
Message-ID: | E1goJ8X-0006Af-8h@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2019-01-29 03:30:30 | pgsql: postgres_fdw: Fix test for cached costs in estimate_path_cost_si |
Previous Message | Andres Freund | 2019-01-29 02:16:33 | pgsql: Fix LLVM related headers to compile standalone (to fix cplusplus |