内容简介:上次寫了「剛剛看到現在的 workaround 是遇到
上次寫了「 PostgreSQL 對 fsync() 的行為傷腦筋...
」提到 fsync()
有些地方是與開發者預期不同的問題,但後面忘記跟進度...
剛剛看到 Percona 的人寫了「 PostgreSQL fsync Failure Fixed – Minor Versions Released Feb 14, 2019 」這篇才發現在 2/14 就出了對應的更新,從 release notes 也可以看到:
By default, panic instead of retrying after fsync() failure, to avoid possible data corruption (Craig Ringer, Thomas Munro) Some popular operating systems discard kernel data buffers when unable to write them out, reporting this as fsync() failure. If we reissue the fsync() request it will succeed, but in fact the data has been lost, so continuing risks database corruption. By raising a panic condition instead, we can replay from WAL, which may contain the only remaining copy of the data in such a situation. While this is surely ugly and inefficient, there are few alternatives, and fortunately the case happens very rarely. A new server parameter data_sync_retry has been added to control this; if you are certain that your kernel does not discard dirty data buffers in such scenarios, you can set data_sync_retry to on to restore the old behavior.
現在的 workaround 是遇到 fsync()
失敗時為了避免 data corruption,會直接 panic 讓整個 PostgreSQL 從 WAL replay 記錄,也代表 HA 機制 (如果有設計的話) 有機會因為這個原因被觸發...
不過也另外設計了 data_sync_retry
,讓 PostgreSQL 的管理者可以硬把這個 panic 行為關掉,改讓 PostgreSQL 重新試著 fsync()
,這應該是在之後 kernel 有修改時會用到...
以上所述就是小编给大家介绍的《PostgreSQL 對 fsync() 的修正》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 13 - 已知小问题修正
- 13 - 已知小问题修正
- jQuery 二级联动(小问题修正)
- 自我总结代码规范,欢迎修正
- Istio 1.5 部署指南修正版
- ThinkPHP V6.0.7 发布——修正版本
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
PHP典型模块与项目实战大全
杨宇 / 清华大学出版社 / 2012-1 / 79.00元
《PHP典型模块与项目实战大全》以实战开发为原则,以PHP典型模块和项目开发为主线,通过12个高质量的PHP典型模块和6个PHP大型应用,向读者揭示了Web开发的整体结构,并详尽地介绍PHP开发与建站的技术要点。《PHP典型模块与项目实战大全》附带1张DVD,内容是作者为《PHP典型模块与项目实战大全》录制的全程多媒体语音教学视频及《PHP典型模块与项目实战大全》所涉及的源代码。《PHP典型模块与......一起来看看 《PHP典型模块与项目实战大全》 这本书的介绍吧!