Re: A few new options for vacuumdb
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-01-04T23:49:46Z
Lists: pgsql-hackers
Attachments
- v2-0006-Add-min-relation-size-option-to-vacuumdb.patch (application/octet-stream) patch v2-0006
- v2-0001-Do-not-process-any-relations-if-the-catalog-query.patch (application/octet-stream) patch v2-0001
- v2-0002-Support-parenthesized-syntax-for-ANALYZE-in-vacuu.patch (application/octet-stream) patch v2-0002
- v2-0003-Add-disable-page-skipping-and-skip-locked-to-vacu.patch (application/octet-stream) patch v2-0003
- v2-0004-Always-use-a-catalog-query-to-discover-tables-to-.patch (application/octet-stream) patch v2-0004
- v2-0005-Add-min-xid-age-and-min-mxid-age-options-to-vacuu.patch (application/octet-stream) patch v2-0005
On 12/21/18, 11:14 AM, "Bossart, Nathan" <bossartn@amazon.com> wrote: > On 12/21/18, 10:51 AM, "Robert Haas" <robertmhaas@gmail.com> wrote: >> On Thu, Dec 20, 2018 at 11:48 AM Bossart, Nathan <bossartn@amazon.com> wrote: >>> Either way, we'll still have to decide whether to fail or to silently >>> skip the option if you do something like specify --min-mxid-age for a >>> 9.4 server. >> >> +1 for fail. > > Sounds good. I'll keep all the version checks and will fail for > unsupported options in the next patch set. Here's an updated set of patches with the following changes: - 0002 adds the parenthesized syntax for ANALYZE. - 0003 adds DISABLE_PAGE_SKIPPING for VACUUM. - 0003 also ensures SKIP_LOCKED is applied for --analyze-only. - 0004 alters vacuumdb to always use the catalog query to discover the list of tables to process. - 0003, 0005, and 0006 now fail in vacuum_one_database() if a specified option is not available on the server version. - If tables are listed along with --min-xid-age, --min-mxid-age, or --min-relation-size, each table is processed only if it satisfies the provided options. 0004 introduces a slight change to existing behavior. Currently, if you specify a missing table, vacuumdb will process each table until it reaches the nonexistent one, at which point it will fail. After 0004 is applied, vacuumdb will fail during the catalog query, and no tables will be processed. I considered avoiding this change in behavior by doing an additional catalog lookup for each specified table to see whether it satisfies --min-xid-age, etc. However, this introduced quite a bit more complexity and increased the number of catalog queries needed. Nathan
Commits
-
Add --min-xid-age and --min-mxid-age options to vacuumdb
- 00d1e88d3668 12.0 landed
-
Do not filter by relkind in vacuumdb's catalog query if --table is used
- b8f73df0f845 12.0 landed
-
Use catalog query to discover tables to process in vacuumdb
- e0c2933a767c 12.0 landed
-
Add TAP tests for vacuumdb with column lists
- 0803b0ae1ed6 12.0 landed
-
Make vacuumdb test regex more modular for its query output
- adaaacae658e 12.0 landed
-
Adjust documentation for vacuumdb --disable-page-skipping
- efab708997dc 12.0 landed
-
Add --disable-page-skipping and --skip-locked to vacuumdb
- 354e95d1f212 12.0 landed