知识卡片
刷盘成功需要可靠反馈
书中 PostgreSQL 的历史案例里,某些系统写回 I/O 失败后仍清除了内核脏标志,且只向错误时已打开文件的描述符报告;后来才打开文件的检查点进程可能错过错误,误把页当作已持久化。一旦据此丢弃日志便可能丢数据,所以恢复协议要验证底层错误反馈及重启行为。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · Recovery
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Recovery · 查看原书依据
Since the checkpointer doesn’t keep all files open at any given point in time, it may happen that it misses error notifications. Because dirty page flags are cleared, the checkpointer will assume that data has successfully made
参考来源
- 位置:《Database Internals》Chapter 5. Transaction Processing and Recovery(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch05.html#idm46104532549896,段 101)
- 结论依据:第 99–102 段阐述 fsync 的历史行为和后果。
- 原始内容:Since the checkpointer doesn’t keep all files open at any given point in time, it may happen that it misses error notifications. Because dirty page flags are cleared, the checkpointer will assume that data has successfully made