From 79f0d4b40460572227eb5547b9de6a46d4d6b218 Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Thu, 11 Sep 2025 13:32:38 +0800
Subject: [PATCH v2] Fix incorrect parameters in comments in tableam.h and
 heapam.c

The function comment incorrectly referred to the input parameter as
"relation". Updated it to "rel" to match the actual parameter name
in tableam.h.

Also removed non-existing parameter tid from commit of function
heap_lock_tuple() in heapam.c.

Author: Chao Li <lic@highgo.com>
---
 src/backend/access/heap/heapam.c | 1 -
 src/include/access/tableam.h     | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 4c5ae205a7a..ed0c0c2dc9f 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -4552,7 +4552,6 @@ get_mxact_status_for_lock(LockTupleMode mode, bool is_update)
  *
  * Input parameters:
  *	relation: relation containing tuple (caller must hold suitable lock)
- *	tid: TID of tuple to lock
  *	cid: current command ID (used for visibility test, and stored into
  *		tuple's cmax if lock is successful)
  *	mode: indicates if shared or exclusive tuple lock is desired
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index b2ce35e2a34..359f6d2bd84 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1433,7 +1433,7 @@ table_multi_insert(Relation rel, TupleTableSlot **slots, int nslots,
  * concurrent-update conditions.  Use simple_table_tuple_delete instead.
  *
  * Input parameters:
- *	relation - table to be modified (caller must hold suitable lock)
+ *	rel - table to be modified (caller must hold suitable lock)
  *	tid - TID of tuple to be deleted
  *	cid - delete command ID (used for visibility test, and stored into
  *		cmax if successful)
@@ -1469,7 +1469,7 @@ table_tuple_delete(Relation rel, ItemPointer tid, CommandId cid,
  * concurrent-update conditions.  Use simple_table_tuple_update instead.
  *
  * Input parameters:
- *	relation - table to be modified (caller must hold suitable lock)
+ *	rel - table to be modified (caller must hold suitable lock)
  *	otid - TID of old tuple to be replaced
  *	slot - newly constructed tuple data to store
  *	cid - update command ID (used for visibility test, and stored into
@@ -1512,7 +1512,7 @@ table_tuple_update(Relation rel, ItemPointer otid, TupleTableSlot *slot,
  * Lock a tuple in the specified mode.
  *
  * Input parameters:
- *	relation: relation containing tuple (caller must hold suitable lock)
+ *	rel: relation containing tuple (caller must hold suitable lock)
  *	tid: TID of tuple to lock (updated if an update chain was followed)
  *	snapshot: snapshot to use for visibility determinations
  *	cid: current command ID (used for visibility test, and stored into
-- 
2.39.5 (Apple Git-154)

