[Pacemaker] PGSQL resource promotion issue

Steven Bambling smbambling at arin.net
Wed Mar 27 07:08:17 EDT 2013


I've built and installed the lastest resource-agents from github on Centos 6 and configured two resources 

1 primitive PGVIP:
pcs resource create PGVIP ocf:heartbeat:IPaddr2 ip=10.1.22.48 cidr_netmask=25 op monitor interval=1

Before setting up the PGSQL resource I manually configured sync/streaming replication on the three nodes with p1.example.com as the master and verified that replication was working.  I think removed the synchronous_standby_name from my postgresql.conf and stop all postgres services on all nodes

1 master/slave PGSQL: -- I've the resource to use sync replication.  Also I am using PGSQL 9.2.3

pcs resource create PGSQL ocf:heartbeat:pgsql params pgctl="/usr/pgsql-9.2/bin/pg_ctl" pgdata="/var/lib/pgsql/9.2/data" config="/var/lib/pgsql/9.2/data/postgresql.conf" stop_escalate="5" rep_mode="sync" node_list="p1.example.com p2.example.com p3.example.com" restore_command='cp /var/lib/pgsql/9.2/archive/%f "%p"' master_ip="10.1.22.48" repuser="postgres" restart_on_promote="true" tmpdir="/var/lib/pgsql/9.2/tmpdir" xlog_check_count="3" crm_attr_timeout="5" check_wal_receiver="true" --master

I'm able to successfully get all the nodes in the cluster started and the PGVIP resource starts on the 1st node and the PGSQL:[012] resource start on each node in the cluster.  The one thing I don't understand is why none of the slaves is taking over the master role.

Also how would I go about force promoting one of the slaves into the master role via the PCS command line utility. 

v/r

STEVE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130327/93918f8f/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130327/93918f8f/attachment-0002.sig>


More information about the Pacemaker mailing list