Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 0AD978EF143 for ; Tue, 20 Mar 2012 08:26:52 -0300 (ADT) Received: from caiajhbdccac.dreamhost.com ([208.97.132.202] helo=homiemail-a76.g.dreamhost.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S9xDH-00054r-UL for pgsql-sql@postgresql.org; Tue, 20 Mar 2012 11:26:52 +0000 Received: from homiemail-a76.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTP id 0070D458080 for ; Tue, 20 Mar 2012 04:26:39 -0700 (PDT) Received: from t60p.bax.ca (24-212-157-60.cable.teksavvy.com [24.212.157.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fbax@uoglobal.net) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTPSA id CA4AA458079 for ; Tue, 20 Mar 2012 04:26:38 -0700 (PDT) Message-ID: <4F686965.5060306@sympatico.ca> Date: Tue, 20 Mar 2012 07:26:29 -0400 From: Frank Bax User-Agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:5.0) Gecko/20110805 Thunderbird/5.0 MIME-Version: 1.0 CC: pgsql-sql@postgresql.org Subject: Re: Setting the process title, or can I? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.2 (/) X-Archive-Number: 201203/54 X-Sequence-Number: 36449 On 03/20/12 06:14, B=C3=A8rto =C3=ABd S=C3=A8ra wrote: >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_activi= ty. Change your filter so it only runs once; not in a forever loop; then add=20 the filter to cron to run every minute. If this new filter continues to freeze; then use pkill to get rid of it. Hopefully RHEL has a pkill command which works like (ps | grep | kill).