Re: A few new options for vacuumdb - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: A few new options for vacuumdb
Date
Msg-id 579F2B3A-4EA5-4032-AAD9-4AEE9219A4AB@amazon.com
Whole thread Raw
In response to Re: A few new options for vacuumdb  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: A few new options for vacuumdb  (Michael Paquier <michael@paquier.xyz>)
Re: A few new options for vacuumdb  (Michael Paquier <michael@paquier.xyz>)
Re: A few new options for vacuumdb  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Joerg Sonnenberger
Date:
Subject: Re: reducing the footprint of ScanKeyword (was Re: Large writablevariables)
Next
From: Stephen Frost
Date:
Subject: Re: [PATCH] Log PostgreSQL version number on startup