内容简介:上次寫了「剛剛看到現在的 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 发布——修正版本
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
推荐系统与深度学习
黄昕、赵伟、王本友、吕慧伟、杨敏 / 清华大学出版社 / 2019-1-1 / 65.00元
本书的内容设置由浅入深,从传统的推荐算法过渡到近年兴起的深度学习技术。不管是初学者,还是有一定经验的从业人员,相信都能从本书的不同章节中有所收获。 区别于其他推荐算法书籍,本书引入了已被实践证明效果较好的深度学习推荐技术,包括Word2Vec、Wide & Deep、DeepFM、GAN 等技术应用,并给出了相关的实践代码;除了在算法层面讲解推荐系统的实现,还从工程层面详细阐述推荐系统如何搭建.一起来看看 《推荐系统与深度学习》 这本书的介绍吧!