Search Postgresql Archives

libpq - prevent automatic reconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 down
output stops
$ sudo ifconfig eht0 up
output resumes 
is there a way to disable this behaviour?




--
View this message in context: http://postgresql.1045698.n5.nabble.com/libpq-prevent-automatic-reconnect-tp5735271.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux