[GENERAL] libpq: indefinite block on poll during network problems

2014-05-27 Thread Dmitry Samonenko
t's just a workaround. So, this infinite poll situation looks like imperfection to me and I think it should be considered as a bug. Is it? With regards, Dmitry Samonenko

Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-27 Thread Dmitry Samonenko
poll fds) to catch keep alive timeout. Sadly, libpq sets (POLLIN | POLLERR). With regards, Dmitry Samonenko

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-28 Thread Dmitry Samonenko
On Tue, May 27, 2014 at 6:10 PM, Tom Lane wrote: > > Would you provide some evidence for these claims? If the keepalive stuff > didn't work, somebody would certainly have noticed by now. > > Sure. I'll try to provide it. > Our general approach to network-error handling is that dropping a > con

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Dmitry Samonenko
in: the problem is NOT with the server. The problem is with libpq's PGgetResult which ultimately leads to very optimistic poll routine. Thank you. With regards, Dmitry Samonenko. 11:25:35.843597 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 12 11:25:35.843629 setsockopt(12, SOL_SOCKET, SO_KE

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-29 Thread Dmitry Samonenko
Please, look inside attached strace_export.txt. Second line. With regard, Dmitry Samonenko.

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Dmitry Samonenko
So, should I fill a bug report? With regards, Dmitry Samonenko.

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Dmitry Samonenko
On Fri, May 30, 2014 at 6:08 PM, Tom Lane wrote: [ shrug... ] This is not a bug. It might be a feature request, but > I doubt that it's a feature anybody would be interested in implementing. > Don't count me out. > Adding timeouts to libpq would mean adding hard-to-test (and therefore > easy-

Re: Fwd: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Dmitry Samonenko
On Fri, May 30, 2014 at 8:19 PM, Martijn van Oosterhout wrote: > 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

Re: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Dmitry Samonenko
On Friday, May 30, 2014, David G Johnston wrote: > Tom Lane-2 wrote > > That argument seems nonsensical from here. If you need HA then you > should > > be using network service monitoring tools, not relying on some random > > libpq client to decide that its connection has been lost. I'm troub

Re: [GENERAL] libpq: indefinite block on poll during network problems

2014-05-30 Thread Dmitry Samonenko
Sorry, my last mail got truncated. I'm starting to like Gmail mobile. On Saturday, May 31, 2014, Dmitry Samonenko wrote: > > >> Though this then begs the question: if the connection comes back up what >> happens in the client? > > > >> Depends on the stat