[postgres@db124 ~]$ repmgr -h 192.168.133.122 -U repmgr -d repmgr -f /u01/app/postgres/repmgr.conf standby clone --dry-run
NOTICE: destination directory "/u01/app/postgres/pgdata" provided
INFO: connecting to source node
DETAIL: connection string is: host=192.168.133.122 user=repmgr dbname=repmgr
WARNING: password file "/home/postgres/.pgpass" has group or world access; permissions should be u=rw (0600) or less
ERROR: connection to database failed
DETAIL:
fe_sendauth: no password supplied
之后,再去执行,就不报错了。
[postgres@db124 ~]$ repmgr -h 192.168.133.122 -U repmgr -d repmgr -f /u01/app/postgres/repmgr.conf standby clone --dry-run
NOTICE: destination directory "/u01/app/postgres/pgdata" provided
INFO: connecting to source node
DETAIL: connection string is: host=192.168.133.122 user=repmgr dbname=repmgr
DETAIL: current installation size is 221 MB
INFO: "repmgr" extension is installed in database "repmgr"
WARNING: target data directory appears to be a PostgreSQL data directory
DETAIL: target data directory is "/u01/app/postgres/pgdata"
HINT: use -F/--force to overwrite the existing data directory
INFO: replication slot usage not requested; no replication slot will be set up for this standby
INFO: parameter "max_wal_senders" set to 10
NOTICE: checking for available walsenders on the source node (2 required)
INFO: sufficient walsenders available on the source node
DETAIL: 2 required, 10 available
NOTICE: checking replication connections can be made to the source server (2 required)
INFO: required number of replication connections could be made to the source server
DETAIL: 2 replication connections required
WARNING: data checksums are not enabled and "wal_log_hints" is "off"
DETAIL: pg_rewind requires "wal_log_hints" to be enabled
NOTICE: standby will attach to upstream node 122
HINT: consider using the -c/--fast-checkpoint option
INFO: would execute:
pg_basebackup -l "repmgr base backup" -D /u01/app/postgres/pgdata -h 192.168.133.122 -p 5432 -U repmgr -X stream
INFO: all prerequisites for "standby clone" are met