[pgpool-general: 4830] Steps to be taken to restore database to master / slave setup

Avi Weinberg AviW at gilat.com
Sun Jul 31 22:44:45 JST 2016

Hi all,

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[1] (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...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160731/8915b1ae/attachment.html>

More information about the pgpool-general mailing list