Re: Re: [GENERAL] libpq error codes - Mailing list pgsql-patches

From Tom Lane
Subject Re: Re: [GENERAL] libpq error codes
Date
Msg-id 10546.961713267@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [GENERAL] libpq error codes  (Denis Perchine <dyp@perchine.com>)
Responses Re: Re: [GENERAL] libpq error codes  (Denis Perchine <dyp@perchine.com>)
List pgsql-patches
Denis Perchine <dyp@perchine.com> writes:
>>>> Looks much more reasonable. But I do not get messages about shutdown.
>>>> With a patch enclosed it will perform like with ECONNRESET.
>>>> Shouldn't I emulate EOF when EPIPE?
>>
>> You *are* emulating EOF --- with that check in place, pqReadData
>> should respond to EPIPE just like it does to a normal EOF.  I don't
>> understand why you aren't seeing the same results I do.

> Hmmm... Looks like I get EPIPE just after connection reset, but you are able
> to read the rest of the data... Looks like Linux kernel problem again...

Ooh, you mean it doesn't give you the rest of the data before reporting
EPIPE?  That seems so broken it's hard to believe --- a whole lot of
programs would be falling over, not just Postgres.  There's probably
something else happening here, but I'm not real sure what.  Might be
worth checking to see exactly what's in libpq's input buffer at the
time it sees the EPIPE error.

            regards, tom lane

pgsql-patches by date:

Previous
From: Denis Perchine
Date:
Subject: Re: Re: [GENERAL] libpq error codes
Next
From: Denis Perchine
Date:
Subject: Re: Re: [GENERAL] libpq error codes