0 like 0 dislike
710 views
asked by (1.5k points)  
edited by
[postgres@slave root]$ /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data/ restart
could not change directory to "/root": Permission denied
pg_ctl: PID file "/var/lib/pgsql/10/data/postmaster.pid" does not exist
Is server running?
starting server anyway
waiting for server to start....2018-05-26 20:36:34.834 IST [45453] LOG:  listening on IPv6 address "::1", port 5432
2018-05-26 20:36:34.834 IST [45453] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2018-05-26 20:36:34.836 IST [45453] LOG:  listening on IPv4 address "192.168.2.3", port 5432
2018-05-26 20:36:34.840 IST [45453] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-05-26 20:36:34.849 IST [45453] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
.2018-05-26 20:36:35.685 IST [45453] LOG:  redirecting log output to logging collector process
2018-05-26 20:36:35.685 IST [45453] HINT:  Future log output will appear in directory "log".

ON POSTGRESQL LOG FILE:
tail -f postgresql-2018-05-26_203635.log
2018-05-26 20:36:35.957 IST [45461] FATAL:  could not connect to the primary server: FATAL:  password authentication failed for user "postgres"
cp: cannot stat ‘/home/postgres/archive/000000010000000000000006’: No such file or directory
2018-05-26 20:36:40.964 IST [45465] FATAL:  could not connect to the primary server: FATAL:  password authentication failed for user "postgres"
cp: cannot stat ‘/home/postgres/archive/000000010000000000000006’: No such file or directory
2018-05-26 20:36:45.963 IST [45467] FATAL:  could not connect to the primary server: FATAL:  password authentication failed for user "postgres"
cp: cannot stat ‘/home/postgres/archive/000000010000000000000006’: No such file or directory
2018-05-26 20:36:50.977 IST [45471] FATAL:  could not connect to the primary server: FATAL:  password authentication failed for user "postgres"
2018-05-26 20:36:55.459 IST [45453] LOG:  received fast shutdown request
2018-05-26 20:36:55.465 IST [45457] LOG:  shutting down
2018-05-26 20:36:55.472 IST [45453] LOG:  database system is shut down

 

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
answered by (1.5k points)  

on master:
--change the postgres user password because you given wrong password in recovery.conf file so you have to change the postgres password on master then put that password in recovery.conf file

alter user postgres with password 'postgres';
Then Restart the slave server:
 /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data/ restart

Related questions

0 like 0 dislike
0 answers
...