Postgresql 数据库 ERROR could not read block 解决

报错信息如下

解决

  1. 在数据库服务器上使用oid2name,将报错oid对应的name找出来。这里假设db库是xxdbname
[postgres@local ~]$ /usr/local/pgsql12/bin/oid2name -d 'xxdbname' -f 2663
From database "xxdbname":
  Filenode                  Table Name
--------------------------------------
      2663  pg_class_relname_nsp_index
[postgres@local  ~]$ 
  1. psql进入DB,切换道对应db库使用REINDEX重建索引
\c xxdbname;
REINDEX INDEX pg_class_relname_nsp_index;

问题解决

posted @ 2020-05-19 16:21  JaminX86  阅读(2114)  评论(0编辑  收藏  举报