匿名用户
10M主要是参数--force-rewind影响,加上这个参数之后出现如下信息:
[postgres@pgdb01:/postgresql/log]$repmgr -f /postgresql/pg12/repmgr.conf standby switchover --siblings-follow --force-rewind
NOTICE: executing switchover on node "pgdb01" (ID: 1)
NOTICE: attempting to pause repmgrd on 3 nodes
NOTICE: local node "pgdb01" (ID: 1) will be promoted to primary; current primary "pgdb02" (ID: 2) will be demoted to standby
NOTICE: stopping current primary node "pgdb02" (ID: 2)
NOTICE: issuing CHECKPOINT on node "pgdb02" (ID: 2)
DETAIL: executing server command "/postgresql/pg12/bin/pg_ctl -D '/postgresql/data' -W -m fast stop"
INFO: checking for primary shutdown; 1 of 60 attempts ("shutdown_check_timeout")
INFO: checking for primary shutdown; 2 of 60 attempts ("shutdown_check_timeout")
NOTICE: current primary has been cleanly shut down at location 0/52000028
NOTICE: promoting standby to primary
DETAIL: promoting server "pgdb01" (ID: 1) using pg_promote()
NOTICE: waiting up to 60 seconds (parameter "promote_check_timeout") for promotion to complete
NOTICE: STANDBY PROMOTE successful
DETAIL: server "pgdb01" (ID: 1) was successfully promoted to primary
NOTICE: issuing CHECKPOINT on node "pgdb01" (ID: 1)
ERROR: unable to execute CHECKPOINT
NOTICE: node "pgdb01" (ID: 1) promoted to primary, node "pgdb02" (ID: 2) demoted to standby
NOTICE: executing STANDBY FOLLOW on 1 of 1 siblings
INFO: STANDBY FOLLOW successfully executed on all reachable sibling nodes
NOTICE: switchover was successful
DETAIL: node "pgdb01" is now primary and node "pgdb02" is attached as standby
NOTICE: STANDBY SWITCHOVER has completed successfully
报错ERROR: unable to execute CHECKPOINT
但是不加--force-rewind这个参数,就没有这个错误;
PG版本12.12
repmgr版本5.3.2
repmgr切换的用户是有superuser权限
墨值悬赏



评论

