Skip to content

Commit 39a3bdc

Browse files
author
Etsuro Fujita
committed
postgres_fdw: Remove useless if-test in GetConnection().
Checking whether entry->conn is NULL after doing disconnect_pg_server() for that entry is pointless, as that function ensures that it is NULL. Thinko in commit 7fc1a81; this would be harmless, so patch HEAD only. Reviewed-by: Richard Guo and Daniel Gustafsson Discussion: https://postgr.es/m/CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM%2BBLWEAhZ_AqQ%40mail.gmail.com
1 parent bfc9497 commit 39a3bdc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contrib/postgres_fdw/connection.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
271271
entry->conn);
272272
disconnect_pg_server(entry);
273273

274-
if (entry->conn == NULL)
275-
make_new_connection(entry, user);
274+
make_new_connection(entry, user);
276275

277276
begin_remote_xact(entry);
278277
}

0 commit comments

Comments
 (0)