[Pacemaker] PostgreSQL replicarion RA: PGSQL.lock
Takatoshi MATSUO
matsuo.tak at gmail.com
Tue Feb 12 00:35:52 UTC 2013
Hi
2013/2/9 Andrew <nitr0 at seti.kr.ua>:
> Hi all.
> For what reason is implemented PGSQL.lock in RA, and what pbs may happen if
> it'll be removed from RA code?
It may cause data inconsistency.
If the file exists in a node, you need to copy data from new master.
> Also, 2nd question: how I can prevent pgsql RA from promoting master before
> both nodes will brings up OR before timeout is reached (for ex., if 2nd node
> is dead)?
You can use xlog_check_count parameter set up with a large number.
RA retries comparing data with specified number of times in Slave.
Or you can use "target-role" such as below too.
----
ms msPostgresql pgsql \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Slave"
---
> I think that clone of Delay RA for both nodes (to avoid switching
> delay on node with Delay resource failure) will do this - but I can't find
> how I should write such rule, it seems like rules in Pacemaker are too
> simple (or too bad described). I expect something like this (in <> braces I
> included rules that I don't know how to write):
>
> location pgsql_master_location ms_Postgresql \
> rule $role="master" -inf: <Delay RA is not running> and <ms_Postgresql
> count eq 1>
>
> Is this possible?
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
More information about the Pacemaker
mailing list