[Pgpool-hackers] path to follow master after a failover

Gilles Darold gilles.darold at dalibo.com
Tue Feb 1 15:31:50 UTC 2011


Le 31/01/2011 07:32, Tatsuo Ishii a écrit :
> One more comment. This patch automatically allows to resync
> non-promoted standby. That's good. But it seems the standby does not
> stop when follow master script executed. Is it required to invoke
> pg_ctl in the script?
It depends how you want to manage the failover/recovery process.

In my installation, the command pcp_recovery_node is calling a
basebackup.sh script following the 'recovery_1st_stage_command'
configuration setting and this script is doing the following :

1) Immediat shutdown of PostgreSQL on the remote slave
2) SELECT pg_start_backup('Streaming Replication', true)
3) rsync -a --delete -e ssh --exclude ..... local_datadir
remote:slave_datadir/
4) rsync of the tablespace if exists
5) SELECT pg_stop_backup()
6) Create a recovery.conf on the remote slave with the correct master ip
address
7) Set hot_standby = on intothe postgresql.conf on the remote slave

That all, pgpool_remote_start et end will start the remote Pg backend.

Regards,

-- 
Gilles Darold
http://dalibo.com - http://dalibo.org



More information about the Pgpool-hackers mailing list