Subject: Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

From: Daniel Gustafsson <[email-masked]>
Date: Mon, 15 Jan 2024 13:43:03 +0100

> On 13 Jan 2024, at 22:38, Ranier Vilela <[email-masked]> wrote:

> In the pgwin32_socket function (src/backend/port/win32/socket.c), there is a possible socket leak if the socket cannot be made non-blocking.

I don't know Windows well enough to comment on the implications of not calling
closesocket here, but it definitely seems like a prudent thing to do
backpatched down to 12. Unless objections I'll do that.

--
Daniel Gustafsson

---

From: Ranier Vilela <[email-masked]>
Date: Tue, 16 Jan 2024 17:25:39 -0300

Em seg., 15 de jan. de 2024 às 09:43, Daniel Gustafsson <[email-masked]>
escreveu:

> > In the pgwin32_socket function (src/backend/port/win32/socket.c), there
> is a possible socket leak if the socket cannot be made non-blocking.
>
Thanks for taking care of this.
Do you have plans or should I register for a commitfest?

Best regards,
Ranier Vilela

---

From: Michael Paquier <[email-masked]>
Date: Wed, 17 Jan 2024 15:26:59 +0900

> Thanks for taking care of this.

Yeah, that's a good catch.

> Do you have plans or should I register for a commitfest?

Daniel has stated that he would take care of it, so why not letting
him a few days?  I don't think that a CF entry is necessary.
--
Michael

---

From: Daniel Gustafsson <[email-masked]>
Date: Wed, 17 Jan 2024 13:53:59 +0100

> On 17 Jan 2024, at 07:26, Michael Paquier <[email-masked]> wrote:

> him a few days?  I don't think that a CF entry is necessary.

It isn't, I've now committed it backpatched down to 12.

--
Daniel Gustafsson

---

From: Ranier Vilela <[email-masked]>
Date: Wed, 17 Jan 2024 12:28:28 -0300

> It isn't, I've now committed it backpatched down to 12.
Thanks for the commit, Daniel.

Best regards,
Ranier Vilela