[PATCH v7 15/16] Trigger authors need not worry about parallelism

Karl O. Pinc <kop@karlpinc.com>

From: "Karl O. Pinc" <kop@karlpinc.com>
To:
Date: 2023-10-02T19:55:16Z
Lists: pgsql-hackers
The idea is that it's worth telling the trigger author who comes
across PARALLEL declarations when creating trigger functions that they
don't need to investigate further.

Is this stating the obvious?  Yes.  But it's not obvious until you've
read about PGs parallelism, and read _enough_ to know that there's
only mention of queries and no mention of data modification
statements.  Knowing that something is missing from PG requires at
least passing familiarity with _all_ of the documentation.

Plus, this patch adds an index entry so the new verbage is easy to find
for those who do investigate.

Agreed, documenting everything PG does _not_ do is a terrible idea.
The goal here is to help trigger authors limit what they need to
research.
---
 doc/src/sgml/trigger.sgml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 6e1f370b21..f6ec8d2a97 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -377,6 +377,17 @@
     trigger.
    </para>
 
+   <indexterm>
+     <primary>parallel safety</primary>
+     <secondary>triggers</secondary>
+   </indexterm>
+
+   <para>
+     Trigger authors need not concern themselves with parallel safety.
+     <link linkend="parallel-query">Parallel execution</link>
+     is supported only in queries, 
+   </para>
+
    <para>
     Each programming language that supports triggers has its own method
     for making the trigger input data available to the trigger function.
-- 
2.30.2


--MP_/VSGM3xNEmY7iJyL2wuWRCjV
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=v7-0016-Predicate-locks-are-held-per-cluster-not-per-data.patch