在尝试进行PostgreSQL数据库转储时,出现以下错误,该进程立即停止。
使用的命令:
openbravo@master.akluck.com:~ 07/26 11:48:11> pg_dump -U tad -h localhost -p 5932 -F c -b -v -f /home/openbravo/dump26072018.dmp openbravo
输出:
pg_dump: reading schemas pg_dump: reading user-defined tables pg_dump: schema with OID 67046 does not exist pg_dump: *** aborted because of error
有人能指导我如何处理这个问题吗?
更新:
我学习了这个教程
http://www.aukema.org/2011/06/fixing-complex-corruption-in-my-dna.html
我可以看到在pg_表中有没有模式名的对象。
但我不知道如何更新pg_表中丢失的模式名。本教程的最后一部分并没有很好的解释。希望有人能给我点启发。
最后找到了一种通过排除损坏的表来获取备份的方法,如下所示
pg_dump --exclude-table=ad_context_info -h localhost -p 5932 -U postgres > dumpsabnew.dmp