何谓组合事务ID
2015-07-29 16:30
330 查看
Multixacts and Wraparound
Multixact IDs are used to support row locking by multiple transactions. Since there is only limited space in a tuple header to store lock information, that information is encoded as a “multiple transaction ID”, or multixact ID for short, whenever there is more than one transaction concurrently locking a row. Information about which transaction IDs are included in any particular multixact ID is stored separately in the pg_multixact subdirectory, and only the multixact ID appears in the xmax field in the tuple header. Like transaction IDs, multixact IDs are implemented as a 32-bit counter and corresponding storage, all of which requires careful aging management, storage cleanup, and wraparound handling. There is a separate storage area which holds the list of members in each multixact, which also uses a 32-bit counter and which must also be managed.组合事务用于支持元组被多个事务同时锁定,当多个事务同时并发的锁定了一个元组时,由于元组头部只能记录较为有限的锁信息,锁定同一个元组的多个事务ID被编码为组合事务ID。而具体的哪些事务ID与组合事务ID相关,这部分信息被存放在pg_multixact子目录下,锁定元组的组合事务ID则存放在元组头信息中的xmax字段中。元组头信息中的t_infomask字段与宏定义HEAP_XMAX_IS_MULTI进行与操作即可判定xmax是否为组合事务
define HEAP_XMAX_IS_MULTI 0x1000 /* t_xmax is a MultiXactId */
相关文章推荐
- 中谷教育05 Python数据类型
- JavaScript常用事件
- composer 报 zlib_decode(): data error
- ubuntu安装 scala
- 移动开发技术资源
- P - Atlantis - hdu1542(求面积)
- 小白学开发(iOS)OC_类的互引用(2015-07-29)
- easyui-combobox下拉多选
- HDU 5326(2015多校3)-Work(dfs)
- 帝国CMS常用函数介绍
- 关于Latex中pdf和eps图片的处理
- 动态链接库
- Map.keySet 和 Map.entrySet 的效率问题
- hdu 5326 work 搜索 2015多校联合训练赛
- mac homebrew 常用命令
- 模式识别 - 处理多个演示样本研究(MIL)特点(matlab)
- Android 中的Shape
- java:IO流学习小结
- class.forName的官方用法说明
- 小白学开发(iOS)OC_new方法原理(2015-07-29)