pgsql: vacuumdb: Teach vacuum_one_database() to reuse query results. - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: vacuumdb: Teach vacuum_one_database() to reuse query results.
Date
Msg-id E1tueZC-0039rg-2J@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
vacuumdb: Teach vacuum_one_database() to reuse query results.

Presently, each call to vacuum_one_database() queries the catalogs
to retrieve the list of tables to process.  A follow-up commit will
add a "missing stats only" feature to --analyze-in-stages, which
requires saving the catalog query results (since tables without
statistics will have them after the first stage).  This commit adds
a new parameter to vacuum_one_database() that specifies either a
previously-retrieved list or a place to return the catalog query
results.  Note that nothing uses this new parameter yet.

Author: Corey Huinker <corey.huinker@gmail.com>
Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/Z5O1bpcwDrMgyrYy%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c03c8d187210f112371aab881b379bd4800562c

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 330 ++++++++++++++++++++++++++-------------------
1 file changed, 194 insertions(+), 136 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Increase default maintenance_io_concurrency to 16
Next
From: Nathan Bossart
Date:
Subject: pgsql: Add commit 796bdda484 to .git-blame-ignore-revs.