psycopg2 (async) socket timeout

Поиск
Список
Период
Сортировка
От Danny Milosavljevic
Тема psycopg2 (async) socket timeout
Дата
Msg-id AANLkTiniHMse020mEc0nvebw_P-1=KFyWEXeBpFwoGGD@mail.gmail.com
обсуждение исходный текст
Ответы Re: psycopg2 (async) socket timeout  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Re: psycopg2 (async) socket timeout  (Jan Urbański <wulczer@wulczer.org>)
Re: psycopg2 (async) socket timeout  (Mark Theisen <mark.theisen@digitecinc.com>)
Re: psycopg2 (async) socket timeout  (Marko Kreen <markokr@gmail.com>)
Список psycopg
Hello,

is it possible to specify the timeout for the socket underlying a connection?

Alternatively, since I'm using the async interface anyway, is it
possible proactively cancel a query that is "stuck" since the TCP
connection to the database is down?

So the specific case is:
- connect to the postgres database using psycopg2 while network is up
- run some queries, get the results fine etc
- send a query
- the network goes down before the result to this last query has been received
- neither a result nor an error callback gets called - as far as I can
see (using txpostgres.ConnectionPool)

What's the proper way to deal with that?

Regards,
   Danny

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

Предыдущее
От: Nicolas Grilly
Дата:
Сообщение: Re: copy_from does not stop reading after an error
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: psycopg2 (async) socket timeout