Since databases are managed by cluster manager I need two different initscripts. Unfortunately the script provided in the rpm uses the 'status' function which does not make difference between two groups of processes: $ /etc/init.d/postgresql status postmaster (pid 5320 5319 5318 5316 5314) is running... $ /etc/init.d/postgresql2 status postmaster (pid 5320 5319 5318 5316 5314) is running...
In this scenario the cluster manager cannot determine wether a single instance is running or down. I'm going to modify initscripts and use a differente approach to probe postmasters status, but I'm not sure if this is good: