An extra error for client disconnection on Windows - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject An extra error for client disconnection on Windows
Date
Msg-id 20160602.175159.60314690.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
Responses Re: An extra error for client disconnection on Windows
Re: An extra error for client disconnection on Windows
List 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

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Parallel pg_dump's error reporting doesn't work worth squat
Next
From: konstantin knizhnik
Date:
Subject: Re: array of domain types