gpt4 book ai didi

postgresql - 如何将 postgres 12 转储文件恢复到 postgres 11.5

转载 作者:行者123 更新时间:2023-12-04 13:38:19 25 4
gpt4 key购买 nike

pg_dump生成的转储文件postgres 12 中的命令

我在 postgres 11.5 中使用的命令:

pg_restore -h [host] -p 5432 -U postgres -d [db] -1 backup.dump

错误信息:
pg_restore: error: could not set default_table_access_method: ERROR:  unrecognized configuration parameter "default_table_access_method"

有可能恢复吗?请指教。

最佳答案

default_table_access_method 在 pg11 中不可用。因此,解决方法是对源数据库进行普通转储,并从您的 backup.dump 文件中删除以下条目

SET default_table_access_method = heap;

之后使用以下命令恢复目标 pg1 上的转储

披露:我为 EnterpriseDB (EDB) 工作

关于postgresql - 如何将 postgres 12 转储文件恢复到 postgres 11.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60523284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com