MCPcopy Create free account
hub / github.com/apache/cloudberry / table_tuple_lock

Function table_tuple_lock

src/include/access/tableam.h:1780–1789  ·  view source on GitHub ↗

* Lock a tuple in the specified mode. * * Input parameters: * relation: relation containing tuple (caller must hold suitable lock) * tid: TID of tuple to lock * snapshot: snapshot to use for visibility determinations * cid: current command ID (used for visibility test, and stored into * tuple's cmax if lock is successful) * mode: lock mode desired * wait_policy: what to do if tuple lock

Source from the content-addressed store, hash-verified

1778 * comments for struct TM_FailureData for additional info.
1779 */
1780static inline TM_Result
1781table_tuple_lock(Relation rel, ItemPointer tid, Snapshot snapshot,
1782 TupleTableSlot *slot, CommandId cid, LockTupleMode mode,
1783 LockWaitPolicy wait_policy, uint8 flags,
1784 TM_FailureData *tmfd)
1785{
1786 return rel->rd_tableam->tuple_lock(rel, tid, snapshot, slot,
1787 cid, mode, wait_policy,
1788 flags, tmfd);
1789}
1790
1791/*
1792 * Perform operations necessary to complete insertions made via

Callers 7

GetTupleForTriggerFunction · 0.85
RelationFindReplTupleSeqFunction · 0.85
ExecDeleteFunction · 0.85
ExecUpdateFunction · 0.85
ExecOnConflictUpdateFunction · 0.85
ExecLockRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected