Re: canceling query

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: canceling query
Date: 2004-04-19 19:11:21
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34B7A5@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2004-04-19 19:19:31 Re: canceling query
Previous Message Tom Lane 2004-04-19 15:36:35 Re: canceling query