pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add comment explaining fire_triggers=false in ri_PerformCheck()
Date: Mon, 30 Mar 2026 01:13:03 +0000
Message-ID: <E1w71Be-0024fU-0U@gemulon.postgresql.org> (raw)

Add comment explaining fire_triggers=false in ri_PerformCheck()

The reason for passing fire_triggers=false to SPI_execute_snapshot()
in ri_PerformCheck() was not documented, making it unclear why it was
done that way.  Add a comment explaining that it ensures AFTER triggers
on rows modified by the RI action are queued in the outer query's
after-trigger context and fire only after all RI updates on the same
row are complete.

Author: Yugo Nagata <nagata@sraoss.co.jp>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Discussion: https://postgr.es/m/20250331212648.ad4ab804559001d7f0788741@sraoss.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1ad7191f7e927ecda72928a9f1e69d40edfed3e4

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)



Message-ID: <E1w71Be-0024fU-0U@gemulon.postgresql.org>
Permalink:  ../E1w71Be-0024fU-0U@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w71Be-0024fU-0U@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add comment explaining fire_triggers=false in ri_PerformCheck()
  In-Reply-To: <E1w71Be-0024fU-0U@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox