Re: PQisBusy returns true but no more data is received.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pelle Johansson <morth(at)morth(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PQisBusy returns true but no more data is received.
Date: 2006-02-28 19:35:26
Message-ID: 23437.1141155326@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pelle Johansson <morth(at)morth(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2006-02-28 20:24:40 Re: problem with windows xp sp2 and postgres-8.1.3
Previous Message Volkan YAZICI 2006-02-28 19:16:47 Re: Breaking Path/Polygon Data into Pieces