From: | Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Setting the process title, or can I? |
Date: | 2012-03-20 10:14:00 |
Message-ID: | CAKwGa_9MOQ1zsFaXcdyaCqbPUNDXhMHPOzpo1SSxME8a5YJ2UA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Bax | 2012-03-20 11:26:29 | Re: Setting the process title, or can I? |
Previous Message | Jayadevan M | 2012-03-20 03:21:10 | Re: Postgresql function which compares values from both tables |