Re: parallel vacuum comments
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
Amit Kapila <amit.kapila16@gmail.com>, Peter Geoghegan <pg@bowt.ie>
Date: 2021-11-01T12:47:17Z
Lists: pgsql-hackers
Attachments
- regression_tests_for_parallel_vacuum.patch (application/octet-stream) patch
On Mon, Nov 1, 2021 at 10:44 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Sun, Oct 31, 2021 at 6:21 AM Andres Freund <andres@anarazel.de> wrote: > > > > Hi, > > > > Due to bug #17245: [1] I spent a considerably amount of time looking at vacuum > > related code. And I found a few things that I think could stand improvement: > > > > - There's pretty much no tests. This is way way too complicated feature for > > that. If there had been tests for the obvious edge case of some indexes > > being too small to be handled in parallel, but others needing parallelism, > > the mistake leading to #17245 would have been caught during development. > > Yes. We should have tests at least for such cases. For discussion, I've written a patch only for adding some tests to parallel vacuum. The test includes the reported case where small indexes are not processed by the leader process as well as cases where different kinds of indexes (i.g., different amparallelvacuumoptions) are vacuumed or cleaned up. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
Move parallel vacuum code to vacuumparallel.c.
- 8e1fae193864 15.0 landed
-
Move index vacuum routines to vacuum.c.
- cc8b25712b5e 15.0 landed
-
Improve parallel vacuum implementation.
- 22bd3cbe0c28 15.0 landed
-
Fix parallel amvacuumcleanup safety bug.
- c59278a1aa5e 15.0 landed
- f6162c020c88 14.1 landed
-
Simplify state managed by VACUUM.
- b4af70cb2103 14.0 cited