Postgres fix for a possible unavailable dbname