$ repmgr -f /etc/repmgr.conf standby switchover--dry-run --force-rewindNOTICE: checking switchoveronnode"node2"(ID:2)in--dry-run modeINFO: prerequisitesforusing pg_rewind are metWARNING: unabletoconnecttoremote host"192.168.56.101"via SSHERROR: unabletoconnect via SSHtohost"192.168.56.101",...
1 | node1 | primary | * running | | default | 100 | 1 | host=127.0.0.1 user=repmgr dbname=repmgr connect_timeout=2 2 | node2 | standby | running | node1 | default | 100 | 1 | host=127.0.0.1 port=5433 user=repmgr dbname=repmgr connect_timeout=2 3 | node3 | standby | run...
2su - pg1334-- 主库5cat > /pg13/pg13/repmgr.conf << "EOF"6node_id=17node_name=lhrrepmgr643618conninfo='host=172.72.6.61 user=repmgr password=lhr dbname=repmgr connect_timeout=2'9data_directory='/pg13/pgdata'10pg_bindir='/pg13/pg13/bin'11EOF121314-- 从库115cat > /pg13/pg13/...
pgsql@node110-> repmgr -f /postgresql/pgsql/repmgr.conf standby switchover --siblings-follow --force-rewind --dry-runNOTICE:checking switchoveronnode"node110"(ID:1)in--dry-run modeINFO:prerequisitesforusingpg_rewind are metINFO:SSH connectiontohost"192.168.0.111"succeededINFO:abletoexecute"repm...
NOTICE: setting node 1's upstream to node 2 WARNING: unable to ping "host=192.168.120.25 user=repmgr dbname=repmgr connect_timeout=2" DETAIL: PQping() returned "PQPING_NO_RESPONSE" NOTICE: starting server using "sudo /usr/bin/systemctl start postgresql-12.service" ...
第二次执行时不再提示输入yes,并且可以成功执行命令,则表示SSH对等性配置成功。 执行过程: 代码语言:javascript 复制 [pg13@lhrrepmgr64361/]# ssh pg13@lhrrepmgr64362 date Tue Apr2717:15:04CST2021[root@lhrrepmgr64361/]#[pg13@lhrrepmgr64361/]# ssh pg13@lhrrepmgr64363 date ...
ssh node114 hostname 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 配置防火墙 [ALL] cat >> $PGDATA/pg_hba.conf <<"EOF" local repmgr repmgr md5 host repmgr repmgr 127.0.0.1/32 md5 host repmgr repmgr 192.168.0.0/24 md5 local replication repmgr md5 ...
"user=repmgr connect_timeout=2 dbname=repmgr host=192.168.56.11 port=5432 fallback_application_name=repmgr options=-csearch_path="ERROR:connectiontodatabase failedDETAIL:connectiontoserver at"192.168.56.11", port5432failed: Connection refusedIsthe server runningonthat hostandaccepting TCP/IP ...