Re: A few new options for vacuumdb
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-01-31T02:03:35Z
Lists: pgsql-hackers
Attachments
- vacuumdb-min-age-v9.patch (text/x-diff) patch v9
On Wed, Jan 30, 2019 at 05:45:58PM +0000, Bossart, Nathan wrote: > On 1/29/19, 4:47 PM, "Michael Paquier" <michael@paquier.xyz> wrote: >> Oh, OK. This makes sense. It would be nice to add a comment in the >> patch and to document this calculation method in the docs of >> vacuumdb. > > Sure, this is added in v8. Thanks, Nathan. Something which was not correct in the patch is the compatibility of the query. xid <> xid has been added in 9.6, so the new options will not be able to work with older versions. The versions marked as compatible in the last patch came from the age-ing functions, but you added direct comparisons with relfrozenxid and relminmxid in the latest versions of the patch. This implementation goes down a couple of released versions, which is useful enough in my opinion, so I would keep it as-is. I have added as well some markups around "PostgreSQL" in the docs, and extra casts for the integer/xid values of the query. The test patterns are also simplified, and I added tests for incorrect values of --min-xid-age and --min-mxid-age. Does that look correct to you? > Thanks. Something else I noticed is that we do not retrieve foreign > tables and partitioned tables for --analyze and --analyze-only. > However, that has long been the case for parallel mode, and this issue > should probably get its own thread. Good point, this goes down a couple of releases, and statistics on both may be useful to compile for a system-wide operation. Spawning a separate thread looks adapted to me. -- Michael
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