我知道所有与基于ARM的M1 Mac相关的配置挑战,这就是为什么我已经以多种方式多次卸载和重新安装了Homebrew和Postgres等所有东西(包括Rosetta,不包括Rosetta,使用“arch -x86_64 brew”命令,使用Postgres应用程序而不是Homebrew安装)。我在随机留言板上遇到过几个遇到同样问题(也是在新Mac上)并没有任何运气的人,这就是为什么我不愿意相信它是一个驱动器损坏问题的原因。(我也多次运行了Disk Utility FirstAid检查;它说一切都健康,但我不知道它有多可靠。)
我使用thoughtbot平等性来将我的开发环境数据库与当前在生产中的内容同步。当我运行"development restore production"时,我会在终端中看到数百行输出,这些输出看起来像下面的输出(这是在下载完成之后但在继续创建默认值、处理数据、序列设置等之前立即出现的)。我相信这是问题的根源,但我不确定解决方案是什么:
pg_restore: dropping TABLE [table name1]
pg_restore: from TOC entry 442; 1259 15829269 TABLE [table name1] u1oi0d2o8cha8f
pg_restore: error: could not execute query: ERROR: table "[table name1]" does not exist
Command was: DROP TABLE "public"."[table name1]";
pg_restore: dropping TABLE [table name2]
pg_restore: from TOC entry 277; 1259 16955 TABLE [table name2] u1oi0d2o8cha8f
pg_restore: error: could not execute query: ERROR: table "[table name2]" does not exist
Command was: DROP TABLE "public"."[table name2]";
pg_restore: dropping TABLE [table name3]
pg_restore: from TOC entry 463; 1259 15830702 TABLE [table name3] u1oi0d2o8cha8f
pg_restore: error: could not execute query: ERROR: table "[table name3]" does not exist
Command was: DROP TABLE "public"."[table name3]";
pg_restore: dropping TABLE [table name4]
pg_restore: from TOC entry 445; 1259 15830421 TABLE [table name4] u1oi0d2o8cha8f
pg_restore: error: could not execute query: ERROR: table "[table name4]" does not exist
Command was: DROP TABLE "public"."[table name4]";
还有其他人遇到过这个问题吗?非常感谢任何解决方案的建议。谢谢!
编辑:我在一台较旧的MacBook Pro上(也运行Big Sur)复制了相同的问题,因此似乎与M1无关,但可能与Big Sur有关。
EFAULT
相关联的消息,这意味着Postgres将无效指针传递给read()
或类似的系统调用。这表明Postgres或某个关联库中存在相当低级别的错误,或者由于不良硬件、过热等原因导致了内存损坏。 - Nate Eldredge