> <peter.geoghega...@gmail.com> wrote: >> Why hasn't libpq had keepalives for years? > > I guess that it's because keepalive doesn't work as expected > in some cases. For example, if the network outage happens > before a client sends some packets, keepalive doesn't work, > then it would have to wait for a long time until it detects > the outage. This is the specification of linux kernel. So > a client should not have excessive expectations of keepalive, > and should have another timeout like QueryTimeout of JDBC.
In my experience, the problems described are common when using libpq over any sort of flaky connection, which I myself regularly do (not just with Slony, but with a handheld wi-fi PDT application, where libpq is used without any wrapper). The slony docs say it takes about 2 hours for the problem to correct itself, but I have found that it may take a lot longer, perhaps because I have a hybrid Linux/Windows Slony cluster. > keepalive doesn't work, > then it would have to wait for a long time until it detects > the outage. I'm not really sure what you mean. In this scenario, would it take as long as it would have taken had keepalives not been used? I strongly welcome anything that can ameliorate these problems, which are probably not noticed by the majority of users, but are a real inconvenience when they do arise. Regards, Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers