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 7fc1a81e4; 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
pull/137/head
Etsuro Fujita 2 years ago
parent bfc9497ece
commit 39a3bdc9eb
  1. 1
      contrib/postgres_fdw/connection.c

@ -271,7 +271,6 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
entry->conn); entry->conn);
disconnect_pg_server(entry); disconnect_pg_server(entry);
if (entry->conn == NULL)
make_new_connection(entry, user); make_new_connection(entry, user);
begin_remote_xact(entry); begin_remote_xact(entry);

Loading…
Cancel
Save