Skip to content

Parallel CREATE INDEX for GIN indexes #120

@grantzhou

Description

@grantzhou

--- As of 2026-01-26T23:33:55.000Z ---

Tomas Vondra reported resolving a bug fix and test coverage issue for parallel GIN index creation. The fix addressed incorrect use of b-tree operator lookup instead of GIN opclass comparison function in tuplesort_begin_index_gin(). This bug could cause errors when no b-tree opclass exists or disagreement between btree/gin opclasses on ordering. Two patches were implemented: 0001 fixed the operator lookup issue, and 0002 added regression tests to improve code coverage for parallel GIN builds by tweaking existing tests to build GIN indexes in parallel. Both patches were pushed and backpatched to version 18. The discussion resolved questions about a potentially outdated comment regarding serial execution of parallel-planned scans.

Tomas Vondra报告解决了并行GIN索引创建的错误修复和测试覆盖问题。修复解决了tuplesort_begin_index_gin()中错误使用b-tree操作符查找而非GIN opclass比较函数的问题。此错误可能在没有b-tree opclass或btree/gin opclass在排序上存在分歧时导致错误。实现了两个补丁:0001修复了操作符查找问题,0002通过调整现有测试以并行构建GIN索引来添加回归测试,改善并行GIN构建的代码覆盖率。两个补丁均已推送并向后移植到版本18。讨论解决了关于并行计划扫描串行执行的可能过时注释的问题。

participants - 参与者:

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacker discussionshacker discussions summarized by PGNexus Agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions