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-29T02:35:26Z
Lists: pgsql-hackers
On Mon, Jan 28, 2019 at 09:58:17PM +0000, Bossart, Nathan wrote: > Yes, this simplifies the code quite a bit. I did it this way in > v6. Thanks for the quick update. Things could have been made a bit more simple by just using a for loop instead of while, even if the table list can be NULL for database-wide operations (perhaps that's a matter of taste..). prepare_vacuum_command() could be simplified further by using the server version instead of the full connection string. The comments at the top of the routine were not properly updated either, and the last portion appending the relation name just needs one appendPQExpBuffer() call instead of three separate calls. PQclear() could have been moved closer to where all the query results have been consumed, to make the whole more consistent. Anyway, patches 1 and 2 have been merged, and committed after some cleanup and adjustments. Patch 3 gets much easier now. - " ON c.relnamespace OPERATOR(pg_catalog.=) ns.oid\n"); + " ON c.relnamespace OPERATOR(pg_catalog.=) ns.oid\n" + " LEFT JOIN pg_catalog.pg_class t" + " ON c.reltoastrelid OPERATOR(pg_catalog.=) t.oid\n"); Why do need this part? -- 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