Skip to content

Commit 42eae25

Browse files
committed
Update comments about index parallel builds
Commit b437571 allowed parallel builds for BRIN, but left behind two comments claiming only btree indexes support parallel builds. Reported by Egor Rogov, along with similar issues in SGML docs. Backpatch to 17, where parallel builds for BRIN were introduced. Reported-by: Egor Rogov Backpatch-through: 17 Discussion: https://postgr.es/m/114e2d5d-125e-07d8-94aa-5ad175fb7443@postgrespro.ru
1 parent 88baa27 commit 42eae25

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/backend/catalog/index.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@ index_build(Relation heapRelation,
29582958

29592959
/*
29602960
* Determine worker process details for parallel CREATE INDEX. Currently,
2961-
* only btree has support for parallel builds.
2961+
* only btree and BRIN have support for parallel builds.
29622962
*
29632963
* Note that planner considers parallel safety for us.
29642964
*/

src/backend/optimizer/plan/planner.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -6768,7 +6768,8 @@ plan_cluster_use_sort(Oid tableOid, Oid indexOid)
67686768
* CREATE INDEX should request for use
67696769
*
67706770
* tableOid is the table on which the index is to be built. indexOid is the
6771-
* OID of an index to be created or reindexed (which must be a btree index).
6771+
* OID of an index to be created or reindexed (which must be an index with
6772+
* support for parallel builds - currently btree or BRIN).
67726773
*
67736774
* Return value is the number of parallel worker processes to request. It
67746775
* may be unsafe to proceed if this is 0. Note that this does not include the

0 commit comments

Comments
 (0)