Re: Error on PQputline() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Error on PQputline()
Date
Msg-id 23165.1021677004@sss.pgh.pa.us
Whole thread Raw
In response to Error on PQputline()  ("Dann Corbit" <DCorbit@connx.com>)
List pgsql-hackers
"Dann Corbit" <DCorbit@connx.com> writes:
> The contents of the error message are:
> conn->errorMessage.data    0x00312440 "pqFlush() --  couldn't send data:
> errno=0
> No error A non-blocking socket operation could not be completed
> immediately.

You're running libpq with the nonblocking mode selected?

> What is the correct recovery action?

Redesign libpq's nonblock mode :-(.  It's a mess; a quick hack that
doesn't even try to cover all cases, and is unreliable in the ones it
does cover.  You can find my previous rants on the subject in the
archives from a couple years back (around Jan '00 I believe).  IMHO
we should never have accepted that patch at all.

Short of that, don't use the COPY code with nonblock.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: More schema queries
Next
From: "Dann Corbit"
Date:
Subject: Re: Error on PQputline()