public inbox for [email protected]
help / color / mirror / Atom feedFrom: Richard Guo <[email protected]>
To: Etsuro Fujita <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: postgres_fdw: Useless if-test in GetConnection()
Date: Wed, 15 Mar 2023 18:40:00 +0800
Message-ID: <CAMbWs4-G59FBY7gA06c+wW7j+3=WBS5J6s1vXJsjfBsEJsCeJA@mail.gmail.com> (raw)
In-Reply-To: <CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM+BLWEAhZ_AqQ@mail.gmail.com>
References: <CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM+BLWEAhZ_AqQ@mail.gmail.com>
On Wed, Mar 15, 2023 at 6:18 PM Etsuro Fujita <[email protected]>
wrote:
> While working on something else, I noticed that the “if (entry->conn
> == NULL)” test after doing disconnect_pg_server() when re-establishing
> a given connection in GetConnection() is pointless, because the former
> function ensures that entry->conn is NULL. So I removed the if-test.
> Attached is a patch for that. I think we could instead add an
> assertion, but I did not, because we already have it in
> make_new_connection().
+1. Good catch.
Thanks
Richard
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: postgres_fdw: Useless if-test in GetConnection()
In-Reply-To: <CAMbWs4-G59FBY7gA06c+wW7j+3=WBS5J6s1vXJsjfBsEJsCeJA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox