Re: A few new options for vacuumdb
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: "Bossart, Nathan" <bossartn@amazon.com>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-01-08T02:03:00Z
Lists: pgsql-hackers
On Mon, Jan 07, 2019 at 06:10:21PM +0900, Masahiko Sawada wrote: > 0002 and 0003 are merged and posted by Michael-san and it looks good > to me, so I've looked at the 0001, 0004, 0005 and 0006 patches. Here > is a few review comments. I have done another round on 0002/0003 (PQfinish was lacking after error-ing on incompatible options) and committed the thing. > Even if all tables are filtered by --min-relation-size, min-mxid-age > or min-xid-age the following message appeared. > > $ vacuumdb --verbose --min-relation-size 1000000 postgres > vacuumdb: vacuuming database "postgres" > > Since no tables are processed in this case isn't is better not to > output this message by moving the message after checking if ntup == > 0? Hmm. My take on this one is that we attempt to vacuum relations on this database, but this may finish by doing nothing. Printing this message is still important to let the user know that an attempt was done so I would keep the message. > You use pg_total_relation_size() to check the relation size but it > might be better to use pg_relation_size() instead. The > pg_total_relation_size() includes the all index size but I think it's > common based on my experience that we check only the table size > (including toast table) to do vacuum it or not. Yes, I am also not completely sure if the way things are defined in the patch are completely what we are looking for. Still, I have seen as well people complain about the total amount of space a table is physically taking on disk, including its indexes. So from the user experience the direction taken by the patch makes sense, as much as does the argument you do. -- 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