Detecting query timeouts properly

Поиск
Список
Период
Сортировка
От Evan Martin
Тема Detecting query timeouts properly
Дата
Msg-id 541F2714.7040107@realityexists.net
обсуждение исходный текст
Ответы Re: Detecting query timeouts properly  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hello,

I'm using PostgreSQL 9.2.8 via Npgsql 2.2.0. When a query times out it
returns error 57014 with the message "canceling statement due to
statement timeout". I use the message to detect the timeout and re-try
in some cases. It seems a bit wrong to rely on the message, though - I
presume the message text is subject to change between releases. Is there
a better way? I cannot just rely on code 57014, because the same code is
used when the user cancels the query (eg. from pgAdmin), in which case I
don't want to re-try.

Regards,

Evan


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

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Strategy for moving a large DB to another machine with least possible down-time
Следующее
От: Eric Smith
Дата:
Сообщение: Re: can't restore database created with pg_dump