[英]PG::UndefinedFile at / ERROR: could not open file
I am getting the following error on a particular id
, when I try to do TestModel.find_each
everytime. 当我每次尝试执行
TestModel.find_each
时,我在特定的id
上收到以下错误。 Even though I am able to access that object by find
. 即使我能够通过
find
访问该对象。 and on deleting that particular object, this same error with the same oid(16385) and index(19388) is occurring for the just next id. 并且在删除该特定对象时,对于刚刚下一个id,正在发生具有相同oid(16385)和索引(19388)的相同错误。 Why is this happening?
为什么会这样?
PG::UndefinedFile at / ERROR: could not open file "base/16385/19338.2" (target block 268441506): No such file or directory
PG :: UndefinedFile at / ERROR:无法打开文件“base / 16385 / 19338.2”(目标块268441506):没有这样的文件或目录
This is unrelated to rails
, it's a postgres
message indicating that a datafile is missing. 这与
rails
无关,它是一条postgres
消息,表明缺少数据文件。
16385
is the identifier (OID) of the database, 19338
the relation
in PG terms (an index or a table). 16385
是数据库的标识符(OID), 19338
是PG术语中的relation
(索引或表)。
You may question why a datafile disappeared from PostgreSQL data directory, this should never happen. 您可能会质疑数据文件从PostgreSQL数据目录中消失的原因,这绝不会发生。
The advice in this case is to restore the entire database from a backup. 这种情况下的建议是从备份中恢复整个数据库。
Maybe you'll see more errors or errors in context in the postgresql log files. 也许你会在postgresql日志文件中看到更多的错误或错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.