问题描述:
访问postgresql的从库时,提示 cannot execute REINDEX during recovery... Please REINDEX it
,然后我在pgsql主库对出问题的索引重建了一下
postgres=# REINDEX INDEX xxx_id
然后再访问从库,还会出现could not read block 0 in file "base/23117/128556": read only 0 of 8192 bytes
异常。
问题解决
在postgresql主库中将出问题的索引删除掉,再重新建这个索引。直接REINDEX不管用。
问题原因
之前集群有问题,可能是多次切换主从,导致索引出现问题
网友评论