[pgpool-general: 4830] Steps to be taken to restore database to master / slave setup
AviW at gilat.com
Sun Jul 31 22:44:45 JST 2016
I wrote a restore script for master / slave streaming replication with pgpool running on both machines in HA mode. The script does the following
1) Stop both pgpools (so I will not cause failover when I stop the postgres service)
2) Stop both postgres services
3) Delete recovery.conf file
4) Start postgres on one of the servers (regardless if it was master or slave since now it come up normally since I deleted recovery.conf file)
5) Start pgpool on both servers
6) Create a new database (create_db)
7) Perform pg_restore to the server that I started its postgres service
8) Run follow_master so the other machine with the stopped postgres service will become the slave
Is there a better way of doing it?
Sometimes I get the following error
psql: ERROR: unable to read message kind
DETAIL: kind does not match between master(53) slot (45)
When I run it again it works. What might have cause this error
IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pgpool-general