[Pacemaker] configuring postgresql streaming replication cluster

Gregg Jaskiewicz gryzman at gmail.com
Thu Jun 13 13:57:14 UTC 2013


On 13 June 2013 10:51, Takatoshi MATSUO <matsuo.tak at gmail.com> wrote:

> Hi
>
> > As far the logs go, anything specific I should be grepping for ?
>
> Please grep pgsql
>
> > node_list="hanode01 hanode02" \
>
> You need to add all node names whose replication is controlled by
> Pacemaker.
>
> > pcs resource master msPostgresql pgsql master-max=1 master-node-max=1
> clone-max=10 clone-node-max=10 notify=true
>
> Why do you use clone-node-max=10 ?
> Please use clone-node-max=1
>
> > pcs constraint order start master-group  then promote msPostgresql
> symmetrical=false score=2
>
> You should start master-group after promote msPostgresql.
>
> I am not good at pcs.
> Please see
> https://github.com/t-matsuo/resource-agents/wiki/Resource-Agent-for-PostgreSQL-9.1-streaming-replication
>
> Thank you. That change however didnt seem to have helped.
I installed crmsh, and here's the config dump in crm format:


node hanode01
node hanode02
node hanode03

primitive pgsql ocf:heartbeat:pgsql \
        params pgctl="/usr/pgsql-9.2/bin/pg_ctl"
psql="/usr/pgsql-9.2/bin/psql" pgdata="/var/lib/pgsql/9.2/data/"
restore_command="cp /var/lib/pgsql/9.2/data/pg_archive/\%f \%p"
start_opt="-p 5432" rep_mode="async" node_list="hanode01 hanode02"
master_ip="10.0.1.100" stop_escalate="0" repuser="replicator"
monitor_password="lemon31ee7" monitor_user="monitor" \
        op start interval="0s" role="Master" timeout="60s" on-fail="block"

primitive vip-master ocf:heartbeat:IPaddr2 \
        params ip="10.0.0.100" nic="eth1:0" cidr_netmask="24"
migration-threshold="0" \
        op start interval="0s" timeout="60s" on-fail="block"

primitive vip-rep ocf:heartbeat:IPaddr2 \
        params ip="10.0.1.100" nic="eth2:0" cidr_netmask="24"
migration-threshold="0" \
        op start interval="0s" timeout="60s" on-fail="block"

group master-group vip-master vip-rep

ms msPostgresql pgsql \
        meta master-max="1" master-node-max="1" clone-max="10"
clone-node-max="1" notify="true" target-role="Master"

location location-master-group-hanode01-5000 master-group 5000: hanode01

order order-master-group-msPostgresql-3 3: master-group:stop
msPostgresql:demote symmetrical=false
order order-msPostgresql-master-group-2 2: msPostgresql:promote
master-group:start symmetrical=false

property $id="cib-bootstrap-options"     \
        expected-quorum-votes="3" \
        stonith-enabled="false"   \
        no-quorum-policy="ignore"

rsc_defaults $id="rsc_defaults-options" \
        resource-stickiness="INFINITY"  \
        migration-threshold="1"


Attached are the logs from Today (I was changing the configuration,
starting stoping, removing and readding things in the mean time).

this is what I got after: grep pgsql /var/log/messages
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130613/41bce8c0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgsql_messages.log.gz
Type: application/x-gzip
Size: 2970 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130613/41bce8c0/attachment-0002.bin>


More information about the Pacemaker mailing list