[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] PQisBusy returns true but no more data is received.
From:       Tom Lane <tgl () sss ! pgh ! pa ! us>
Date:       2006-02-28 19:35:26
Message-ID: 23437.1141155326 () sss ! pgh ! pa ! us
[Download RAW message or body]

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic