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

Lines changed: 1 addition & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy