| From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
|---|---|
| To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: postgres_fdw: Useless if-test in GetConnection() |
| Date: | 2023-03-16 09:25:46 |
| Message-ID: | CAPmGK15fCSXhtKf4pBip94gvCk=kJ7rR91jWjMQ-vSZQ7E7EXw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Mar 15, 2023 at 7:40 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> On Wed, Mar 15, 2023 at 6:18 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Drouvot, Bertrand | 2023-03-16 09:25:59 | Re: Get rid of PgStat_BackendFunctionEntry |
| Previous Message | Drouvot, Bertrand | 2023-03-16 09:24:32 | Re: Split index and table statistics into different types of stats |