内容简介:上次寫了「剛剛看到現在的 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 发布——修正版本
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
并行计算导论
Ananth Grama、George Karypis、张武、毛国勇、Anshul Gupta、Vipin Kumar、程海英 / 张武、毛国勇、程海英 / 机械工业出版社 / 2005-1-1 / 49.00元
《并行计算导论》(原书第2版)全面介绍并行计算的各个方面,包括体系结构、编程范例、算法与应用和标准等,涉及并行计算的新技术,也覆盖了较传统的算法,如排序、搜索、图和动态编程等。《并行计算导论》(原书第2版)尽可能采用与底层平台无关的体系结构并且针对抽象模型来设计处落地。书中选择MPI、POSIX线程和OpenMP作为编程模型,并在不同例子中反映了并行计算的不断变化的应用组合。一起来看看 《并行计算导论》 这本书的介绍吧!