重庆思庄Oracle、Redhat认证学习论坛

标题: repmgr切换报ERROR: unable to execute "repmgr" [打印本页]

作者: 郑全    时间: 2024-12-28 18:32
标题: repmgr切换报ERROR: unable to execute "repmgr"
完整信息如下:

[postgres@db124 ~]$ repmgr standby switchover -f /u01/app/postgres/repmgr.conf --siblings-follow --dry-run
NOTICE: checking switchover on node "db124" (ID: 124) in --dry-run mode
INFO: SSH connection to host "192.168.133.122" succeeded
ERROR: unable to execute "repmgr" on "192.168.133.122"
HINT: check "pg_bindir" is set to the correct path in "repmgr.conf"; current value: (not set)


原因是:pg_bindir 没有设置。

解决办法:
    正确设置后,就可:

[postgres@db124 ~]$ cat /u01/app/postgres/repmgr.conf |grep pg_bin
pg_bindir='/u01/app/postgres/product/12.7/dbhome_1/bin'


[postgres@db124 ~]$ repmgr standby switchover -f /u01/app/postgres/repmgr.conf --siblings-follow --dry-run
NOTICE: checking switchover on node "db124" (ID: 124) in --dry-run mode
INFO: SSH connection to host "192.168.133.122" succeeded
INFO: able to execute "repmgr" on remote host "192.168.133.122"
WARNING: option "--sibling-nodes" specified, but no sibling nodes exist
INFO: 1 walsenders required, 10 available
INFO: demotion candidate is able to make replication connection to promotion candidate
INFO: 0 pending archive files
INFO: replication lag on this standby is 0 seconds
NOTICE: attempting to pause repmgrd on 2 nodes
NOTICE: local node "db124" (ID: 124) would be promoted to primary; current primary "db122" (ID: 122) would be demoted to standby
INFO: following shutdown command would be run on node "db122":
  "pg_ctl  -D '/u01/app/postgres/pgdata' -W -m fast stop"
INFO: parameter "shutdown_check_timeout" is set to 60 seconds
INFO: prerequisites for executing STANDBY SWITCHOVER are met







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2