ITPub博客

首页 > 数据库 > 数据库开发技术 > postgres crash recovery

postgres crash recovery

原创 数据库开发技术 作者:fiona8953 时间:2017-07-11 14:00:23 0 删除 编辑

两阶段提交,在一些客户端异步事务,或者跨库的事务处理中非常常见。

目前,如果数据库crash,PostgreSQL恢复时,对2PC处理机制如下

* on prepare 2pc data (subxacts, commitrels, abortrels, invalmsgs) saved to xlog and to file, but file not is not fsynced  
* on commit backend reads data from file  
* if checkpoint occurs before commit, then files are fsynced during checkpoint  
* if case of crash replay will move data from xlog to files 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26477398/viewspace-2141898/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: How MVCC work
下一篇: Relational Algebra
请登录后发表评论 登录
全部评论

注册时间:2014-06-13

  • 博文量
    284
  • 访问量
    222491