pgAgent crashes on failed connection

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgAgent crashes on failed connection
Дата
Msg-id 4E3AF0D2.8020908@enterprisedb.com
обсуждение исходный текст
Ответы Re: pgAgent crashes on failed connection  (Merlin Moncure <mmoncure@gmail.com>)
Список pgadmin-hackers
I created 100 identical pgagent jobs, with one step that simply does
"SELECT pg_sleep(10)". I then forced them all to run immediately, with
"UPDATE pgagent.pga_job SET jobnextrun=now();". pgagent crashed.

What happened is that the when all those jobs are launched at the same
time, the server ran into the max_connections limit, and pgagent didn't
handle that too well. JobThread::JobThread constructor does not check
for NULL result from DBConn::Get(), and passes a NULL connection to
Job::Job, which tries to reference it, leading to a segfault.

I propose the attached patch.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Broken link in pgAgent/README
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: pgAgent crashes on failed connection