Enable parallel VACUUM (currently disabled via GPDB_14_MERGE_FIXME due to lock issues)
Maintainer thường phản hồi trong vòng 3 ngày
@chenjinbao1989 đang làm issue này rồi.
Từ ngày 21/7/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
PostgreSQL 16's parallel VACUUM (parallel index vacuuming) is currently disabled in Cloudberry. VACUUM (PARALLEL n) is accepted syntactically, but at runtime the parallel option is silently downgraded to serial with a WARNING, on both the coordinator and every segment. The real parallel code path is compiled out.
Where
src/backend/access/heap/vacuumlazy.c:3209
/* GPDB_14_MERGE_FIXME: Don't support parallel vacuum now, we need to fix lock issues. */
if (nworkers > 0 && vacrel->do_index_vacuuming && vacrel->nindexes > 1)
ereport(WARNING,
(errmsg("disabling parallel option of vacuum on \"%s\" --- cannot vacuum tables in parallel",
vacrel->relname)));
#if 0
else
... /* the actual parallel_vacuum_init() / parallel path is #if 0'd out */
So any table with more than one index that is asked to vacuum in parallel hits this guard, and the upstream parallel path below it is dead-coded via #if 0.
Reproduction
Environment: PostgreSQL 16.9 / Apache Cloudberry 3.0.0-devel (main, c781604c5bad), 3 primary segments.
CREATE TABLE pv_demo(id int, a int, b int, c text) DISTRIBUTED BY (id);
INSERT INTO pv_demo SELECT g,g,g,md5(g::text) FROM generate_series(1,1000000) g;
CREATE INDEX ON pv_demo(a);
CREATE INDEX ON pv_demo(b);
CREATE INDEX ON pv_demo(c);
DELETE FROM pv_demo WHERE id % 3 = 0;
VACUUM (PARALLEL 3, VERBOSE) pv_demo;
Output:
WARNING: disabling parallel option of vacuum on "pv_demo" --- cannot vacuum tables in parallel
WARNING: disabling parallel option of vacuum on "pv_demo" --- cannot vacuum tables in parallel (seg0 ... )
WARNING: disabling parallel option of vacuum on "pv_demo" --- cannot vacuum tables in parallel (seg1 ... )
WARNING: disabling parallel option of vacuum on "pv_demo" --- cannot vacuum tables in parallel (seg2 ... )
INFO: finished vacuuming "postgres.public.pv_demo": index scans: 1
The vacuum completes, but serially (index scans: 1, no parallel workers launched).
Root cause
Per the in-tree comment, parallel vacuum was left disabled during the PG14→PG16 merge because of unresolved lock issues in the MPP context (parallel workers inside a QE backend vs. the segment-local locking / dispatch model). The parallel path was #if 0'd rather than adapted.
Proposed work
- Resolve the lock issues that block backend-parallel index vacuuming inside a segment QE.
- Re-enable the
#if 0'd parallel path (parallel_vacuum_init()etc.) soVACUUM (PARALLEL n)and autovacuum can use parallel workers per segment. - If it cannot be supported in the MPP model, replace the silent runtime downgrade with clear documentation and, ideally, a one-time notice rather than a per-relation
WARNING.
Notes
max_parallel_maintenance_workerscurrently defaults to2but has no effect on VACUUM because of the guard above.- Scope: heap tables with 2+ indexes. AO/AOCO tables use a different vacuum path and are out of scope for this specific guard.
- Ngôn ngữ chính
- C
- Star
- 1.4k
- Fork
- 260
- Merge trung bình
- 4 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 56
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudberry
-
[Bug] Expand fails to recognize user-defined tablespacesCó thể đã có người làm @nix-oss đã nhận 58 ngày trước. Đang mởtype: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/cloudberry#1885 · 2 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
gpexpand first stage fails: 'SyncPackages' object has no attribute 'ret' (extension sync never runs; regression)Có thể đã có người làm @talmacschen-arch đã nhận 119 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
apache/cloudberry#1825 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
type: Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
apache/cloudberry#2135 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug] REINDEX DATABASE CONCURRENTLY breaks temporary PAX tables created with ON COMMIT DELETE ROWSĐang mởtype: Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
apache/cloudberry#2134 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
apache/cloudberry#2130 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của apache/cloudberry
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`inverse()` of a controlled `CUGate` drops the phase parameter γCó thể đã có người làm @rupasri118 đã nhận hôm nay. Đang mởbug mod: circuit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Qiskit/qiskit#17223 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OpenPrinting/libcupsfilters#284 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
libsdl-org/SDL#16530 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FriendsofECCE/ECCE#336 · 1 bình luận ·