update PostgresDatabase to handle multiple connections