pgsql: Clarify RI tuple-lock result handling comments

From: Amit Langote <amitlan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clarify RI tuple-lock result handling comments
Date: 2026-09-10 08:18:15
Message-ID: E1x4Zz4-00000004GLX-0jmY@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clarify RI tuple-lock result handling comments

Explain that returning false for TM_SelfModified follows ExecLockRows(),
which skips such tuples. This differs from TM_Updated, which is
unexpected in READ COMMITTED with FIND_LAST_VERSION.

Also remove "fall through to error" from the TM_Updated comment, since
the code calls elog(ERROR) directly.

Reported-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAA4eK1Lk1DfgiFPL-HccZm-Nm+exg+FcsODH8KPw6BOBuzfHtA@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ca3fd678f47becc5b84e0b027b2f062c5ad05b2b

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2026-09-10 08:18:29 pgsql: Clarify RI tuple-lock result handling comments
Previous Message Fujii Masao 2026-09-10 07:13:03 pgsql: Remove stale comment and redundant assignment in BuildTupleHashT