再现postgresql奇怪问题? 400 报错
select age from tbName where id =13; select count(age) from tbName where id =13; select * from tbName where id =13; select max(age) from tbName;
select max(age) from tbName where id =13;
你的磁盘出了问题,对应的页面出了问题。 有个参数可以解决,但是需要比较谨慎,建议先备份数据库然后再进行操作
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 that might be present in the table. It is useful for recovering data if corruption has occurred due to a hardware or software error. You should generally not set this on until you have given up hope of recovering data from the damaged pages of a table. Zeroed-out pages are not forced to disk so it is recommended to recreate the table or the index before turning this parameter off again. The default setting is off, and it can only be changed by a superuser.
@Galy ?这么长时间过去了没人理。你怎么会突然跑过来回答这样一个几乎没人愿意回答也几乎没人能回答的问题呢?
不过,你的回答确实很一针见血。 这个问题我当时也没有彻底解决,但是我印象中我查过的英文资料中确实有很大的倾向指向了和你相同的回答。但是由于我英文还不是很好、加上我对很深的东西还不太懂,就没有继续彻底研究下去。
我还以为不会有人对这类问题感兴趣了呢。先谢谢你了啊。以后有时间我再好好看一下。
######啊?!原来是专家啊!!
然您亲自光临寒舍,真是三生有幸啊。。。
先膜拜了!!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。