libpq - prevent automatic reconnect

Поиск
Список
Период
Сортировка
От icholy
Тема libpq - prevent automatic reconnect
Дата
Msg-id 1354730724609-5735271.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: libpq - prevent automatic reconnect
Список pgsql-general

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: libpq - prevent automatic reconnect
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Corrupt indexes on slave when using pg_bulkload on master
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: how do I grant select to one user for all tables in a DB?