diff options
author | Etsuro Fujita | 2023-03-17 09:15:00 +0000 |
---|---|---|
committer | Etsuro Fujita | 2023-03-17 09:15:00 +0000 |
commit | 39a3bdc9eba50628cecb7e3cada95271180c8744 (patch) | |
tree | e69a2de99e6d7cd63f483493929b9422f5d78b0f | |
parent | bfc9497ece01c7c45437bc36387cb1ebe346f4d2 (diff) |
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
-rw-r--r-- | contrib/postgres_fdw/connection.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 12b54f15cd..8eb9194506 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -271,8 +271,7 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state) entry->conn); disconnect_pg_server(entry); - if (entry->conn == NULL) - make_new_connection(entry, user); + make_new_connection(entry, user); begin_remote_xact(entry); } |