从 postgres 14 beta 升级到 postgres 14 新版本
Upgrading from postgres 14 beta to postgres 14 new release
我安装了 postgres 14 beta,我想升级到 14 新版本。我刚刚安装了新版本的 pg 14,当我尝试启动 pg 14 beta 时,出现以下错误。我可以知道从测试版升级到新版本的正确步骤吗
-bash-4.2$ /usr/pgsql-14/bin/pg_ctl -D /var/lib/pgsql/14/data -l logfile start
waiting for server to start.... stopped waiting
pg_ctl: could not start server
Examine the log output.
-bash-4.2$ cat logfile
2021-10-27 13:19:29.507 UTC [5112] FATAL: database files are incompatible with server
2021-10-27 13:19:29.507 UTC [5112] DETAIL: The database cluster was initialized with CATALOG_VERSION_NO 202106151, but the server was compiled with CATALOG_VERSION_NO 202107181.
2021-10-27 13:19:29.507 UTC [5112] HINT: It looks like you need to initdb.
2021-10-27 13:19:29.507 UTC [5112] LOG: database system is shut down
自 v14 beta 1 以来,目录版本发生了变化,因此您必须使用 pg_upgrade
的 fump/restore 来升级。
安装14.0,创建新集群,使用您选择的方式升级。
我安装了 postgres 14 beta,我想升级到 14 新版本。我刚刚安装了新版本的 pg 14,当我尝试启动 pg 14 beta 时,出现以下错误。我可以知道从测试版升级到新版本的正确步骤吗
-bash-4.2$ /usr/pgsql-14/bin/pg_ctl -D /var/lib/pgsql/14/data -l logfile start
waiting for server to start.... stopped waiting
pg_ctl: could not start server
Examine the log output.
-bash-4.2$ cat logfile
2021-10-27 13:19:29.507 UTC [5112] FATAL: database files are incompatible with server
2021-10-27 13:19:29.507 UTC [5112] DETAIL: The database cluster was initialized with CATALOG_VERSION_NO 202106151, but the server was compiled with CATALOG_VERSION_NO 202107181.
2021-10-27 13:19:29.507 UTC [5112] HINT: It looks like you need to initdb.
2021-10-27 13:19:29.507 UTC [5112] LOG: database system is shut down
自 v14 beta 1 以来,目录版本发生了变化,因此您必须使用 pg_upgrade
的 fump/restore 来升级。
安装14.0,创建新集群,使用您选择的方式升级。