Re: PQisBusy returns true but no more data is received. - Mailing list pgsql-general

From Tom Lane
Subject Re: PQisBusy returns true but no more data is received.
Date
Msg-id 23437.1141155326@sss.pgh.pa.us
Whole thread Raw
In response to PQisBusy returns true but no more data is received.  (Pelle Johansson <morth@morth.org>)
List pgsql-general
Pelle Johansson <morth@morth.org> writes:
> Basically, I have an epoll loop that executes the following code when
> I receive data from postgresql (greatly simplified).
> ...
> The problem is that after two iterations in the loop PQisBusy()
> returns true, making me exit to the event loop, but no more data is
> received, so the function will not be called again.

Shouldn't happen.  Can you provide a complete test case?  (Are you sure
the problem isn't just the SELECT taking a long time?)

> Is it safe to move the call to PQisBusy() outside the loop,

Not if the idea is to not block in PQgetResult.

            regards, tom lane

pgsql-general by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: Breaking Path/Polygon Data into Pieces
Next
From: "Magnus Hagander"
Date:
Subject: Re: problem with windows xp sp2 and postgres-8.1.3