Postgresql 无法访问文件";pglogical";在尝试安装pglogical时

Postgresql 无法访问文件";pglogical";在尝试安装pglogical时,postgresql,pglogical,Postgresql,Pglogical,我按照的说明在Centos 8上安装pglogical。安装似乎成功了: yum -y install postgresql12-pglogical Last metadata expiration check: 0:21:30 ago on Wed 30 Sep 2020 09:32:13 PM CDT. Dependencies resolved. =======================================================================

我按照的说明在Centos 8上安装pglogical。安装似乎成功了:

 yum -y install postgresql12-pglogical
Last metadata expiration check: 0:21:30 ago on Wed 30 Sep 2020 09:32:13 PM CDT.
Dependencies resolved.
=====================================================================================================================================================================================================================================================
 Package                                                      Architecture                                 Version                                                   Repository                                                                 Size
=====================================================================================================================================================================================================================================================
Installing:
 postgresql12-pglogical                                       x86_64                                       2.3.2-1.el8                                               2ndquadrant-dl-default-release-pg12                                       145 k
Installing dependencies:
 postgresql12                                                 x86_64                                       12.4-1PGDG.rhel8                                          pgdg12                                                                    1.6 M
 postgresql12-server                                          x86_64                                       12.4-1PGDG.rhel8                                          pgdg12                                                                    5.2 M

Transaction Summary
=====================================================================================================================================================================================================================================================
Install  3 Packages

Total download size: 7.0 M
Installed size: 29 M
Downloading Packages:
(1/3): postgresql12-12.4-1PGDG.rhel8.x86_64.rpm                                                                                                                                                                      1.5 MB/s | 1.6 MB     00:01
(2/3): postgresql12-pglogical-2.3.2-1.el8.x86_64.rpm                                                                                                                                                                 117 kB/s | 145 kB     00:01
(3/3): postgresql12-server-12.4-1PGDG.rhel8.x86_64.rpm                                                                                                                                                               4.0 MB/s | 5.2 MB     00:01
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                5.3 MB/s | 7.0 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                             1/1
  Installing       : postgresql12-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                        1/3
  Running scriptlet: postgresql12-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                        1/3
failed to link /usr/bin/psql -> /etc/alternatives/pgsql-psql: /usr/bin/psql exists and it is not a symlink
failed to link /usr/bin/clusterdb -> /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exists and it is not a symlink
failed to link /usr/bin/createdb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exists and it is not a symlink
failed to link /usr/bin/createuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuser exists and it is not a symlink
failed to link /usr/bin/dropdb -> /etc/alternatives/pgsql-dropdb: /usr/bin/dropdb exists and it is not a symlink
failed to link /usr/bin/dropuser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exists and it is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_basebackup: /usr/bin/pg_basebackup exists and it is not a symlink
failed to link /usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exists and it is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_dumpall: /usr/bin/pg_dumpall exists and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_restore: /usr/bin/pg_restore exists and it is not a symlink
failed to link /usr/bin/reindexdb -> /etc/alternatives/pgsql-reindexdb: /usr/bin/reindexdb exists and it is not a symlink
failed to link /usr/bin/vacuumdb -> /etc/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdb exists and it is not a symlink

  Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                 2/3
  Installing       : postgresql12-server-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                 2/3
  Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                 2/3
  Installing       : postgresql12-pglogical-2.3.2-1.el8.x86_64                                                                                                                                                                                   3/3
  Running scriptlet: postgresql12-pglogical-2.3.2-1.el8.x86_64                                                                                                                                                                                   3/3
  Verifying        : postgresql12-pglogical-2.3.2-1.el8.x86_64                                                                                                                                                                                   1/3
  Verifying        : postgresql12-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                        2/3
  Verifying        : postgresql12-server-12.4-1PGDG.rhel8.x86_64                                                                                                                                                                                 3/3

Installed:
  postgresql12-12.4-1PGDG.rhel8.x86_64                                         postgresql12-pglogical-2.3.2-1.el8.x86_64                                         postgresql12-server-12.4-1PGDG.rhel8.x86_64

Complete!
但是当我尝试重新启动postgres时,我得到了这个错误

systemctl restart postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
日志的相关部分TL-xe


我迷路了

您的会话日志告诉服务器是作为先决条件安装的,但“链接”消息暗示已经存在不兼容的客户端版本。可能您已经从CentOS软件包中安装了PostgreSQL,但是pglogical RPM将PGDG软件包引入

错误消息可能意味着
shared\u preload\u库
包含
pglogical
,但
pglogical。因此在
lib
目录中找不到

安装过程可能在旧服务器安装中编辑了配置,但在新服务器安装中安装了共享对象

结果:您不能在安装中使用这些逻辑二进制文件。切换到PGDG RPM或从源生成PGDG逻辑


您可以看到,我的推论中有一定数量的推测,但这应该可以帮助您解决问题。

show log\u destination给我
stderr
。我尝试指定日志位置:
pg_ctl start-D/var/lib/pgsql/data/-l pg.log
,它创建了pg.log文件,它有完全相同的错误:
FATAL:无法访问文件“pglogical”:没有这样的文件或目录
日志:数据库系统已关闭
我也运行了initdb。这没用。
-- Unit postgresql.service has begun starting up.
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] FATAL:  could not access file "pglogical": No such file or directory
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] LOG:  database system is shut down
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Failed with result 'exit-code'.
Sep 30 21:54:59 aba systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit postgresql.service has failed.
--
-- The result is failed.