fix some bugs of pgsql RA

- fix grep failure when using maintenance-mode
- fix not working with corosync when using capital hostname