Chris Angelico wrote:
On Thu, Dec 6, 2012 at 5:56 AM, Tom Lane wrote:
I suspect this action isn't dropping the TCP connection. It's only
equivalent to a momentary glitch in your network connectivity --- and
you'd be very unhappy if that caused TCP connections to go down, because
networks have
On Thu, Dec 6, 2012 at 5:56 AM, Tom Lane wrote:
> I suspect this action isn't dropping the TCP connection. It's only
> equivalent to a momentary glitch in your network connectivity --- and
> you'd be very unhappy if that caused TCP connections to go down, because
> networks have glitches all the
icholy writes:
> libpq will automatically reconnect if the connection is dropped.
No it won't. You'd have to do a PQreset() to make that happen.
> auto con = PQconnectdb("info");while (true) {PQclear(PQexec(con,
> "SELECT * FROM foo LIMIT 1"));
> std::this_thread::sleep_for(std::ch
libpq will automatically reconnect if the connection is dropped.
auto con = PQconnectdb("info");while (true) {PQclear(PQexec(con,
"SELECT * FROM foo LIMIT 1"));
std::this_thread::sleep_for(std::chrono::seconds(1));std::cout << "here
" << i++ << std::endl; }
$ sudo ifconfig eth0 do