我已经将 Portainer 下载到我的服务器上,并在那里的容器中创建了一个 PostgreSQL 数据库。
今天我无法再访问数据库。日志显示一条消息,表明存在版本问题。
我已经阅读了一些类似的问题,例如 Postgres container crashes with `database files are incompatible with server` after container's image has been updated to the latest one和 Postgres container crashes with `database files are incompatible with server` after container's image has been updated to the latest one
和解决方案 brew postgresql-upgrade-database
不工作。
我能做什么?
日志
2021-10-03 [1] FATAL: database files are incompatible with server
2021-10-03 [1] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0 (Debian 14.0-1.pgdg110+1).
PostgreSQL Database directory appears to contain a database; Skipping initialization
我也发现了这个 https://www.postgresql.org/docs/14/upgrading.html但命令不起作用。我是否需要以某种方式在容器中执行此操作,或者哪些命令可以使其在容器中运行?
最佳答案
我解决了
假设您知道上述步骤的 docker 命令。
关于postgresql - 数据目录由 PostgreSQL 版本 13 初始化,与此版本 14.0 不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69424563/