An extra error for client disconnection on Windows

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: An extra error for client disconnection on Windows
Date: 2016-06-02 08:51:59
Message-ID: 20160602.175159.60314690.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

After a process termination without PQfinish() of a client,
server emits the following log message not seen on Linux boxes.

> LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.

This is because pgwin32_recv reuturns an error ECONNRESET for the
situation instead of returning non-error EOF as recv(2) does.

This patch translates WSAECONNRESET of WSARecv to an EOF so that
pgwin32_recv behaves the same way with Linux.

The attached patch does this.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Avoid-unnecessary-error-message-on-Windows.patch text/x-patch 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message konstantin knizhnik 2016-06-02 09:13:51 Re: array of domain types
Previous Message Kyotaro HORIGUCHI 2016-06-02 08:49:41 Re: Parallel pg_dump's error reporting doesn't work worth squat