Killing "stuck" queries and preventing queries from getting "stuck"

Поиск
Список
Период
Сортировка
От Tim Uckun
Тема Killing "stuck" queries and preventing queries from getting "stuck"
Дата
Msg-id AANLkTikfk-3tVf_NzwjLo4OS+vrcSsWXv4k7jhdoWOZ3@mail.gmail.com
обсуждение исходный текст
Ответы Re: Killing "stuck" queries and preventing queries from getting "stuck"  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Killing "stuck" queries and preventing queries from getting "stuck"  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
I have a situation where there are dozens of daemons hitting the same
postgres database.  They all run different types of queries but each
daemon runs the same set of queries over and over again.

Sometimes some queries get "stuck" in that they run for hours and
hours. They never stop running.  Killing the deamon does not stop the
query from running.

Once there are three of four of these "stuck" queries the database
slows down drastically.

Is there a way to tell postgres to stop any query that runs longer
than a specified amount of time? Say an hour?

Failing that what is a good strategy for detecting stuck queries and
killing them.

Thanks.

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

Предыдущее
От: Tim Uckun
Дата:
Сообщение: Re: Deleting orphaned records (not exists is very slow)
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: Deleting orphaned records (not exists is very slow)