RE: parallel vacuum comments
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>, Peter Geoghegan <pg@bowt.ie>, Andres Freund <andres@anarazel.de>
Date: 2021-11-16T02:38:29Z
Lists: pgsql-hackers
On Thur, Nov 11, 2021 10:41 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > I've attached a draft patch that refactors parallel vacuum and separates > parallel-vacuum-related code to new file vacuumparallel.c. > After discussion, I'll divide the patch into logical chunks. Hi. I noticed few minor issues in the patch. 1) + /* + * Parallel unsafe indexes can be processed only by leader (these are + * processed in lazy_serial_process_indexes() by leader. + */ It seems the function name in the comments should be serial_vacuum_unsafe_indexes 2) + stats->parallel_workers_can_process = + index_parallel_vacuum_is_safe(pvc->indrels[i], + pvc->num_index_scans, + bulkdel); The function index_parallel_vacuum_is_safe also return false for the index < min_parallel_index_scan_size cutoff which seems parallel safe. So, maybe we can rename the function to xxx_worker_can_process() ? Best regards, Hou zj
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