summaryrefslogtreecommitdiff
path: root/src/include/access/tableam.h
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-11-28 11:59:09 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-11-28 11:59:45 +0200
commit9fee3232a1d3661981c3cbf87227bfd02ee36c7b (patch)
tree54feb97c514acbb01ae051bcf4c5a59854c6f09e /src/include/access/tableam.h
parent07cb7bc1c7a88299e6bce281320397f07ca045c2 (diff)
Fix assertions with RI triggers in heap_update and heap_delete.
If the tuple being updated is not visible to the crosscheck snapshot, we return TM_Updated but the assertions would not hold in that case. Move them to before the cross-check. Fixes bug #17893. Backpatch to all supported versions. Author: Alexander Lakhin Backpatch-through: 12 Discussion: https://www.postgresql.org/message-id/17893-35847009eec517b5%40postgresql.org
Diffstat (limited to 'src/include/access/tableam.h')
-rw-r--r--src/include/access/tableam.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index 230bc39cc0e..ac7b279f322 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1479,8 +1479,8 @@ table_multi_insert(Relation rel, TupleTableSlot **slots, int nslots,
* TM_BeingModified (the last only possible if wait == false).
*
* In the failure cases, the routine fills *tmfd with the tuple's t_ctid,
- * t_xmax, and, if possible, and, if possible, t_cmax. See comments for
- * struct TM_FailureData for additional info.
+ * t_xmax, and, if possible, t_cmax. See comments for struct
+ * TM_FailureData for additional info.
*/
static inline TM_Result
table_tuple_delete(Relation rel, ItemPointer tid, CommandId cid,