Re: canceling query - Mailing list pgsql-hackers-win32

From Magnus Hagander
Subject Re: canceling query
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34B7A5@algol.sollentuna.se
Whole thread Raw
In response to canceling query  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Responses Re: canceling query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers-win32
>> No crash, just:
>
>> LOG:  could not send data to client: Unknown error
>> LOG:  could not receive data from client: Unknown error
>> LOG:  unexpected EOF on client connection
>
>This is expected except for the "Unknown error".  You should be
>seeing the equivalent of EPIPE, typically "Broken pipe" on Unixen.
>It sounds like the error number handling may not be quite right
>on Win32.

A quick lock at this shows that the problem is probably that %m has no
clue about winsock error codes. There is a workaround strerror() in
libpq on win32 (see interfaces/libpq/win32.c and libpq-int.h). My bet is
it's the same thing.

I beleive the fix needs to be in backend/utils/elog.c, function
useful_strerror(). Unless someone either tells me that's the wrong place
or beats me to it, I'll try to get a patch done for this soonest.

//Magnus

pgsql-hackers-win32 by date:

Previous
From: Tom Lane
Date:
Subject: Re: canceling query
Next
From: Tom Lane
Date:
Subject: Re: canceling query