agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Fujii Masao <masao.fujii@oss.nttdata.com>
To: pgsql-docs@lists.postgresql.org
Subject: Mention GIN indexes support parallel builds.
Date: Wed, 18 Jun 2025 16:54:59 +0900
Message-ID: <7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com> (raw)
Hi,
Commit 8492feb98f6 added support for parallel CREATE INDEX on GIN indexes.
However, there are still two places in the docs and two in the source code
comments that mention only B-tree and BRIN as supporting parallel builds.
These references should be updated to include GIN indexes as well. Patch attached.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
From 649b27e536194589c2bf85a05cb84e731dbfeac0 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Wed, 18 Jun 2025 16:30:36 +0900
Subject: [PATCH v1] doc: Mention GIN indexes support parallel builds.
Commit 8492feb98f6 added support for parallel CREATE INDEX on GIN indexes.
However, previously two places in the documentation and two in the source
code comments still stated that only B-tree and BRIN indexes support
parallel builds.
This commit updates those references to correctly include GIN indexes.
---
doc/src/sgml/config.sgml | 3 ++-
doc/src/sgml/ref/create_index.sgml | 2 +-
src/backend/catalog/index.c | 2 +-
src/backend/optimizer/plan/planner.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 7e0e5400ee1..7ee9ea4191e 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2894,7 +2894,8 @@ include_dir 'conf.d'
Sets the maximum number of parallel workers that can be
started by a single utility command. Currently, the parallel
utility commands that support the use of parallel workers are
- <command>CREATE INDEX</command> when building a B-tree or BRIN index,
+ <command>CREATE INDEX</command> when building a B-tree,
+ GIN, or BRIN index,
and <command>VACUUM</command> without <literal>FULL</literal>
option. Parallel workers are taken from the pool of processes
established by <xref linkend="guc-max-worker-processes"/>, limited
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 147a8f7587c..b9c679c41e8 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -814,7 +814,7 @@ Indexes:
leveraging multiple CPUs in order to process the table rows faster.
This feature is known as <firstterm>parallel index
build</firstterm>. For index methods that support building indexes
- in parallel (currently, B-tree and BRIN),
+ in parallel (currently, B-tree, GIN, and BRIN),
<varname>maintenance_work_mem</varname> specifies the maximum
amount of memory that can be used by each index build operation as
a whole, regardless of how many worker processes were started.
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 739a92bdcc1..aa216683b74 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3020,7 +3020,7 @@ index_build(Relation heapRelation,
/*
* Determine worker process details for parallel CREATE INDEX. Currently,
- * only btree and BRIN have support for parallel builds.
+ * only btree, GIN, and BRIN have support for parallel builds.
*
* Note that planner considers parallel safety for us.
*/
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index ff65867eebe..549aedcfa99 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6879,7 +6879,7 @@ plan_cluster_use_sort(Oid tableOid, Oid indexOid)
*
* 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 an index with
- * support for parallel builds - currently btree or BRIN).
+ * support for parallel builds - currently btree, GIN, 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
--
2.49.0
Attachments:
[text/plain] v1-0001-doc-Mention-GIN-indexes-support-parallel-builds.patch (3.5K, ../7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com/2-v1-0001-doc-Mention-GIN-indexes-support-parallel-builds.patch)
download | inline diff:
From 649b27e536194589c2bf85a05cb84e731dbfeac0 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Wed, 18 Jun 2025 16:30:36 +0900
Subject: [PATCH v1] doc: Mention GIN indexes support parallel builds.
Commit 8492feb98f6 added support for parallel CREATE INDEX on GIN indexes.
However, previously two places in the documentation and two in the source
code comments still stated that only B-tree and BRIN indexes support
parallel builds.
This commit updates those references to correctly include GIN indexes.
---
doc/src/sgml/config.sgml | 3 ++-
doc/src/sgml/ref/create_index.sgml | 2 +-
src/backend/catalog/index.c | 2 +-
src/backend/optimizer/plan/planner.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 7e0e5400ee1..7ee9ea4191e 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2894,7 +2894,8 @@ include_dir 'conf.d'
Sets the maximum number of parallel workers that can be
started by a single utility command. Currently, the parallel
utility commands that support the use of parallel workers are
- <command>CREATE INDEX</command> when building a B-tree or BRIN index,
+ <command>CREATE INDEX</command> when building a B-tree,
+ GIN, or BRIN index,
and <command>VACUUM</command> without <literal>FULL</literal>
option. Parallel workers are taken from the pool of processes
established by <xref linkend="guc-max-worker-processes"/>, limited
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 147a8f7587c..b9c679c41e8 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -814,7 +814,7 @@ Indexes:
leveraging multiple CPUs in order to process the table rows faster.
This feature is known as <firstterm>parallel index
build</firstterm>. For index methods that support building indexes
- in parallel (currently, B-tree and BRIN),
+ in parallel (currently, B-tree, GIN, and BRIN),
<varname>maintenance_work_mem</varname> specifies the maximum
amount of memory that can be used by each index build operation as
a whole, regardless of how many worker processes were started.
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 739a92bdcc1..aa216683b74 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3020,7 +3020,7 @@ index_build(Relation heapRelation,
/*
* Determine worker process details for parallel CREATE INDEX. Currently,
- * only btree and BRIN have support for parallel builds.
+ * only btree, GIN, and BRIN have support for parallel builds.
*
* Note that planner considers parallel safety for us.
*/
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index ff65867eebe..549aedcfa99 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6879,7 +6879,7 @@ plan_cluster_use_sort(Oid tableOid, Oid indexOid)
*
* 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 an index with
- * support for parallel builds - currently btree or BRIN).
+ * support for parallel builds - currently btree, GIN, 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
--
2.49.0
view thread (3+ messages) latest in thread
Message-ID: <7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com>
Permalink: ../7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com/
Also on: postgresql.org/message-id/7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: masao.fujii@oss.nttdata.com, pgsql-docs@lists.postgresql.org
Subject: Re: Mention GIN indexes support parallel builds.
In-Reply-To: <7d27d068-90e2-4022-9bd7-09b0fd3d4f47@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox