Test failover for PosgreSql 9.2

Started by yuryuover 10 years ago2 messagesgeneral
Jump to latest
#1yuryu
yudis@illumina.com

Hello,
I am new to posgresql.
I've configured replication for my database . It li working fine, but I need
to test failover capabilities.
According to manual I have to kill completely Master and "touch" a trigger
to make Slave new Master.

Could you please recommend me a way to kill Master in order to test
failover?

Thanks, yuryu.

--
View this message in context: http://postgresql.nabble.com/Test-failover-for-PosgreSql-9-2-tp5867383.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Francisco Reyes
lists@natserv.net
In reply to: yuryu (#1)
Re: Test failover for PosgreSql 9.2

On 09/25/2015 11:20 AM, yuryu wrote:

According to manual I have to kill completely Master and "touch" a trigger
to make Slave new Master.

You don't have to do anything in the master. If you have configured the
slave to check for a file, then it will become Read Write when that file
is created.

You can also do
pg_ctlcluster #.# main promote

Where #.# is version like
pg_ctlcluster 9.3 main promote

In the slave you can run this to check if it is in read only
(replicating) or read write
select pg_is_in_recovery();

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general