英文:
How to fix 'type abstime does not exist' error when upgrading PostgreSQL from 11.20 to 12.15?
问题
Trying to upgrade PostgreSQL from 11.20 to 12.15 and hitting the below error
pg_restore: error: could not execute query: ERROR: type "abstime" does not exist
I do understand that Data types abstime, reltime, and tinterval were removed by postgres under enhancements or version upgrades. but I believe there must be someone in the community who must have faced this issue and managed to find a solution to this problem.
is there anyone in community could help as would like to make progress and keep things secure.
tried to look into KB articles but couldn't find any solution. Looking for solution
尝试将PostgreSQL从11.20升级到12.15,并出现以下错误
pg_restore: error: 无法执行查询:ERROR:类型 "abstime" 不存在
我了解数据类型abstime、reltime和tinterval在PostgreSQL的增强或版本升级中被移除了,但我相信社区中一定有人遇到过这个问题并成功找到了解决方法。
有社区中的任何人能够提供帮助吗?因为我希望能够继续进行并确保事情安全。
尝试查阅知识库文章,但未找到解决方案。正在寻找解决方案。
英文:
Trying to upgrade PostgreSQL from 11.20 to 12.15 and hitting the below error
pg_restore: error: could not execute query: ERROR: type "abstime" does not exist
I do understand that Data types abstime, reltime, and tinterval were removed by postgres under enhancements or version upgrades. but I believe there must be someone in the community who must have faced this issue and managed to find a solution to this problem.
is there anyone in community could help as would like to make progress and keep things secure.
tried to look into KB articles but couldn't find any solution. Looking for solution
答案1
得分: 1
替换所有的abstime
为timestamp(0) with time zone
。您需要在升级之前在v11数据库中执行此操作,除非您希望手动编辑一个转储文件。abstime
在被移除时已经被弃用了近20年,而且存在Y2038问题。
英文:
Replace all occurrences of abstime
with timestamp(0) with time zone
. You'll have to do that in the v11 database before you upgrade, unless you want to manually edit a dump file.
abstime
had been deprecated for almost 20 years when it was removed, and it had a Y2038 problem.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论