简体   繁体   English

PG :: UndefinedFile at / ERROR:无法打开文件

[英]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.

相关问题 PG::UndefinedFile: 错误:无法打开扩展控制文件 - PG::UndefinedFile: ERROR: could not open extension control file PG ::错误:无法连接到服务器:连接被拒绝 - PG::Error: could not connect to server: Connection refused 无法连接到服务器:没有这样的文件或目录(PG::ConnectionBad) - could not connect to server: No such file or directory (PG::ConnectionBad) PostGIS错误 - PG :: InternalError:错误:无法加载库 - PostGIS Error - PG::InternalError: ERROR: could not load library ActiveRecord :: JDBCError:错误:无法打开扩展控制文件 - ActiveRecord::JDBCError: ERROR: could not open extension control file Heroku上偶尔出现Postgres错误:无法将主机名“<pg URL>”转换为地址:名称或服务未知(PG ::错误) - Occasional Postgres error on Heroku: could not translate host name “<pg URL>” to address: Name or service not known (PG::Error) Heroku:PG :: ConnectionBad:无法连接到服务器:没有这样的文件或目录 - Heroku: PG::ConnectionBad: could not connect to server: No such file or directory 由于&#39;pg&#39;而无法捆绑安装 - Could not bundle install because of 'pg' pg 1.0.0 `致命错误:&#39;libpq-fe.h&#39; 文件未找到` - pg 1.0.0 `fatal error: 'libpq-fe.h' file not found` capistrano错误消息:请安装pg适配器:`gem install activerecord-pg-adapter`(无法加载此类文件 - - capistrano error msg: Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file --
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM