Setting the process title, or can I?

Поиск
Список
Период
Сортировка
От Bèrto ëd Sèra
Тема Setting the process title, or can I?
Дата
Msg-id CAKwGa_9MOQ1zsFaXcdyaCqbPUNDXhMHPOzpo1SSxME8a5YJ2UA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Setting the process title, or can I?  (Frank Bax <fbax@sympatico.ca>)
Re: Setting the process title, or can I?  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-sql
Hi all,

running pg 8.3.5 on RHEL (no, they won't upgrade anyway and yes, they know they should).

I currently have an emergency problem with an external java process that sends in rubbish, resulting in deadlocks (might simply be "I take forever" statements that get reported as deadlocks) that do not get resolved. As an emergency procedure we have set a script that each minute has a look at the situation and runs pg_cancel_backend() against anything that has been waiting for more than X secs. Then it sleeps one more minute. There is no data loss as the java source will simply queue the message for resubmission after any failed attempt. For some reasons, however, this very simple 2 lines cycle sometimes freezes.

We do not have enough resources to investigate the causes and obviously we are throwing all we have towards finding out the root of the problem, i.e., how garbage is formed outside PG. So as a dirty and quick hack to make sure our failure filter works I wanted to have an external process kill and relaunch the filter from cron each 30 minutes.

Is there anyway I can mark the process running the filter, maybe using the update_process_title feature? I'd like to have something I can see from a ps command, grep for it and kill -15 it, without wasting our scarce resources on one more pg process to use info from pg_stat_activity.

Cheerio
Bèrto

--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a darkened room munching pills and listening to repetitive music.

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

Предыдущее
От: Jayadevan M
Дата:
Сообщение: Re: Postgresql function which compares values from both tables
Следующее
От: Frank Bax
Дата:
Сообщение: Re: Setting the process title, or can I?