postgresql - Trying to pg_restore from a pg_dump file, FOREIGN TABLEs are causing probems: ERROR: server "" does not exist,
问题描述
Here is the output from the log. This happens hundreds of times then it hangs.
Command I'm running:
pg_restore -h $upgrade_db_host -U $upgrade_db_user -d $upgrade_db_name --no-privileges --no-owner --clean feb20_full_backup.sql
the backup file is created by
pg_dump -U $db_user -h $db_host -d $db_name -Fc > file_name.sql
And then the error
pg_restore: [archiver (db)] Error from TOC entry 714; 1259 787746527 FOREIGN TABLE user_auths fake_schema
pg_restore: [archiver (db)] could not execute query: ERROR: server "suinfo_database_server2" does not exist
Command was: CREATE FOREIGN TABLE startupinfo.user_auths (
id integer NOT NULL,
user_id integer,
authentication_p...
I've tried searching for errors related to "server does not exist" and Foreign Table stuff specifically, but haven't found anything that works.
Anything I am missing to get pg_restore to handle foreign tables?
解决方案
推荐阅读
- kivy - ModuleNotFoundError:当 pyinstaller 创建的 EXE 运行 plyer.filechooser.open_file() 和 choose_dir() 时,没有名为“plyer.platforms”的模块
- wordpress - 如何从网站标题中删除 Home-?
- api - branch.io api 错误(响应:400,身份验证失败)
- arrays - 取出一个字符串并将其分别插入到数组中
- automation - 如何从 Odoo 自动操作导入库
- node.js - Charts.js 动态数据调用(Angular)
- excel - 搜索工作表中的值
- javascript - 具有完整链接平滑滚动的锚点
- azure - 在 Azure AD 的 MultiTenant 应用程序中允许或限制特定 Tetant 的用户
- python - TypeError: 'pygame.Surface' 对象不可调用(数组有问题,在 Pygame 中)