Re: Weird error messages from Windows upon client death

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird error messages from Windows upon client death
Date: 2014-01-29 01:22:50
Message-ID: FFD572BD-A956-4EA0-949E-A647BF382532@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan28, 2014, at 19:19 , Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On windows, if the client gets terminated while sending data to the server, in a
> COPY for example, it results in some rather head-scratcher messages in the server
> log, for example:
>
> LOG: could not receive data from client: No connection could be made because
> the target machine actively refused it.
>
> Since the server was reading from the client and never tries to initiate a
> connection, the %m part of the message is a bit baffling. The errno at this
> point is 10061.

My guess is that the server received a TCP RST, indicating that the client's
socket has gone away, and the the error message is the same for a RST received
during connection setup and a RST received later on.

During connection setup, it absolutely makes sense to say that the "client has
actively refused the connection" if it responds to a SYN packet with RST...

best regards,
Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2014-01-29 01:55:38 Re: [PATCH] Support for pg_stat_archiver view
Previous Message Michael Paquier 2014-01-29 00:51:51 Re: [PATCH] Support for pg_stat_archiver view