大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说PostgreSQL源码学习–删除数据#1,2「建议收藏」,希望您对编程的造诣更进一步.
本节介绍heapam_tuple_delete和table_tuple_delete函数。
heapam_tuple_delete函数
//src/backend/access/heap/heapam_handler.c
static TM_Result
heapam_tuple_delete(Relation relation, ItemPointer tid, CommandId cid,
Snapshot snapshot, Snapshot crosscheck, bool wait,
TM_FailureData *tmfd, bool changingPart)
{
/* 目前,索引元组的删除是在vacuum时处理的 */
return heap_delete(relation, tid, cid, crosscheck, wait, tmfd, changingPart);
}
代码100分
table_tuple_delete函数
代码100分//src/backend/access/heap/heapam_handler.c
static inline TM_Result
table_tuple_delete(Relation rel, ItemPointer tid, CommandId cid,
Snapshot snapshot, Snapshot crosscheck, bool wait,
TM_FailureData *tmfd, bool changingPart)
{
/* 默认的表存储引擎的话,rd_tableam赋值为heapam_methods,
其tuple_delete指向的就是heapam_tuple_delete函数 */
return rel->rd_tableam->tuple_delete(rel, tid, cid,
snapshot, crosscheck,
wait, tmfd, changingPart);
}
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/8006.html