]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Update comments about index parallel builds
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 17 Dec 2024 14:40:07 +0000 (15:40 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 17 Dec 2024 14:48:29 +0000 (15:48 +0100)
Commit b43757171470 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

src/backend/catalog/index.c
src/backend/optimizer/plan/planner.c

index 6c47b3cd739b5cb04768f8e9a02e38f769a32d5e..abd8eef08651a25b53615a31e2c4fab9ee8f0a08 100644 (file)
@@ -2958,7 +2958,7 @@ index_build(Relation heapRelation,
 
        /*
         * Determine worker process details for parallel CREATE INDEX.  Currently,
-        * only btree has support for parallel builds.
+        * only btree and BRIN have support for parallel builds.
         *
         * Note that planner considers parallel safety for us.
         */
index f2c05f31f68bcaebe09decbe0320ae98c9e85938..39ade99155f034af458f0c1000ee3842850011c9 100644 (file)
@@ -6768,7 +6768,8 @@ plan_cluster_use_sort(Oid tableOid, Oid indexOid)
  *             CREATE INDEX should request for use
  *
  * tableOid is the table on which the index is to be built.  indexOid is the
- * OID of an index to be created or reindexed (which must be a btree index).
+ * OID of an index to be created or reindexed (which must be an index with
+ * support for parallel builds - currently btree or BRIN).
  *
  * Return value is the number of parallel worker processes to request.  It
  * may be unsafe to proceed if this is 0.  Note that this does not include the