public inbox for [email protected]
help / color / mirror / Atom feedFrom: Etsuro Fujita <[email protected]>
To: Richard Guo <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: postgres_fdw: Useless if-test in GetConnection()
Date: Thu, 16 Mar 2023 18:25:46 +0900
Message-ID: <CAPmGK15fCSXhtKf4pBip94gvCk=kJ7rR91jWjMQ-vSZQ7E7EXw@mail.gmail.com> (raw)
In-Reply-To: <CAMbWs4-G59FBY7gA06c+wW7j+3=WBS5J6s1vXJsjfBsEJsCeJA@mail.gmail.com>
References: <CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM+BLWEAhZ_AqQ@mail.gmail.com>
<CAMbWs4-G59FBY7gA06c+wW7j+3=WBS5J6s1vXJsjfBsEJsCeJA@mail.gmail.com>
On Wed, Mar 15, 2023 at 7:40 PM Richard Guo <[email protected]> wrote:
> 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.
Cool! Thanks for looking!
Best regards,
Etsuro Fujita
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: <CAPmGK15fCSXhtKf4pBip94gvCk=kJ7rR91jWjMQ-vSZQ7E7EXw@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