Yes, I use
https://raw.github.com/ClusterLabs/resource-agents/a6f4ddf76cb4bbc1b3df4c9b6632a6351b63c19e/heartbeat/pgsql
same
as you.

Thank you for explain. My /etc/postgresql/9.3/main/postgresql.conf have
this string on the end:
include '/var/lib/pgsql/tmp/rep_mode.conf' # added by pgsql RA

And this is file rep_mode.conf:
a) root@a:~# cat /var/lib/pgsql/tmp/rep_mode.conf
synchronous_standby_names = ''
b) root@b:~# cat /var/lib/pgsql/tmp/rep_mode.conf
synchronous_standby_names = ''
root@b:~#
c) root@c:~# cat /var/lib/pgsql/tmp/rep_mode.conf
synchronous_standby_names = ''


May be sed rule is incorrect?



2013/12/14 Takehiro Matsushima <[email protected]>

> 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
>
_______________________________________________
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