add script and config for pg master ha