I used resource-agents contained in default debian repositories, and
replace pgsql RA with this;
https://raw.github.com/ClusterLabs/resource-agents/a6f4ddf76cb4bbc1b3df4c9b6632a6351b63c19e/heartbeat/pgsql
but, maybe it is same yours.


> But I can't udnerstand what this code will do:
>                 if grep -q "$rep_mode_string" $OCF_RESKEY_config; then
>                     ocf_log info "deleting include directive from
> $OCF_RESKEY_config"
>                     sed -i "/${rep_mode_string//\//\\/}/d"
> $OCF_RESKEY_config
>                 fi

1) Find "include '/var/lib/postgresql/tmp/rep_mode.conf'" from postgresql.conf.
   ( if grep -q "$rep_mode_string" $OCF_RESKEY_config; then)
   This include line is appended by RA.
2) If found then remove it. (sed -i "/${rep_mode_string//\//\\/}/d"
$OCF_RESKEY_config)
   ${rep_mode_string//\//\\/} works escape path delimiter itself for sed.
   You can rewrite it like this... sed -i "|${rep_mode_string}|d"
$OCF_RESKEY_config

Could you show me the result of "tail -n 1
/etc/postgresql/9.3/main/postgresql.conf" and "find /var/lib -name
rep_mode.conf" on each node?
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to