Merge "Clean up postgres connection handling"