HA related changes

This contains sort of changes that are needed to support HA. By default HA should be disabled and should not have any impact on users not using it.
Would this be better if you only defined the class start_postgres_server if your not ha enabled?
No big objection either way, just seemed easier to read.