Caused by: org.postgresql.util.PSQLException: ERROR: unexpected data beyond EOF in block 0 of relation base/18101/63191
Hint: This has been seen to occur with buggy kernels; consider updating your system.
Where: SQL statement "insert into tb_conf_attribute(confid,attrid,attrvalue) values(72141388,1,'true'),**"
PL/pgSQL function createorupdateconf(text,text,text,text,integer,integer) line 12 at EXECUTE statement
@digoal Linux version 3.2.0-67-generic (buildd@brownie) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 我们有多台服务器,系统和数据库的版本都是一样的,这次移植到新服务器出现这个问题。 至于zero_damaged_pages这个参数应该没有设置
@digoal zero_damaged_pages参数是设置成的false,至于升级内核,具体是要升级到什么版本?
1. 什么操作系统内核版本?
2. 有没有打开参数zero_damaged_pages?
从现象来看,建议你确认一下zero_damaged_pages这个参数是否打开,如果打开了,请关闭它。
如果没有打开,建议你升级内核。
/*
* We get here only in the corner case where we are trying to extend
* the relation but we found a pre-existing buffer marked BM_VALID.
* This can happen because mdread doesn't complain about reads beyond
* EOF (when zero_damaged_pages is ON) and so a previous attempt to
* read a block beyond EOF could have left a "valid" zero-filled
* buffer. Unfortunately, we have also seen this case occurring
* because of buggy Linux kernels that sometimes return an
* lseek(SEEK_END) result that doesn't account for a recent write. In
* that situation, the pre-existing buffer would contain valid data
* that we don't want to overwrite. Since the legitimate case should
* always have left a zero-filled buffer, complain if not PageIsNew.
*/
bufBlock = isLocalBuf ? LocalBufHdrGetBlock(bufHdr) : BufHdrGetBlock(bufHdr);
if (!PageIsNew((Page) bufBlock))
ereport(ERROR,
(errmsg("unexpected data beyond EOF in block %u of relation %s",
blockNum, relpath(smgr->smgr_rnode, forkNum)),
errhint("This has been seen to occur with buggy kernels; consider updating your system.")));
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。