了解PostgreSQL的参数zero_damaged_pages

为什么80%的码农都做不了架构师?>>>   hot3.png

写这篇BLOG,源自我们的一台虚拟测试机出现了异常, 报错信息如下: invalid page header in block 59640 of relation base/175812/1077620; zeroing out page。 看到这里得提到PostgreSQL的一个隐藏系统参数,zero_damaged_pages,官方文档上是这样描述的:
zero_damaged_pages (boolean)
Detection of a damaged page header normally causes PostgreSQL to report an error, aborting the current transaction. Setting zero_damaged_pages to on causes the system to instead report a warning, zero out the damaged page in memory, and continue processing. This behavior will destroy data, namely all the rows on the damaged page. However, it does allow you to get past the error and retrieve rows from any undamaged pages t

你可能感兴趣的:(数据库,大数据)