Fixing postgresql connectivity issues