Re: Fwd: libpq: indefinite block on poll during network problems - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Fwd: libpq: indefinite block on poll during network problems
Date
Msg-id 20140530161954.GC19553@svana.org
Whole thread Raw
In response to Re: Fwd: libpq: indefinite block on poll during network problems  (Dmitry Samonenko <shreddingwork@gmail.com>)
Responses Re: Fwd: libpq: indefinite block on poll during network problems
List pgsql-general
On Fri, May 30, 2014 at 07:48:00PM +0400, Dmitry Samonenko wrote:
> > BTW, you might consider using libpq's nonblock mode to push the waiting
> > out to the application level, and then you could just decide when you've
> > waited too long for yourself.
> >
> Do you mean PQsendQuery / PQisBusy / PQgetResult? Well, I wouldn't start
> this discussion if that was an option. Adopting async command processing
> would lead to starting client from scratch.

I don't think the suggestion is to move to async command processing. I
think the suggestion is to use those methods to make a
PGgetResultWithTimeout() that does what you want.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
   -- Arthur Schopenhauer

Attachment

pgsql-general by date:

Previous
From: Chris Hanks
Date:
Subject: row_to_json on a subset of columns.
Next
From: reiner peterke
Date:
Subject: unable to build postgres-9.4 in os x 10.9 with python