X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 68F3C9F9CD8 for ; Mon, 22 May 2006 21:53:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63346-01 for ; Mon, 22 May 2006 21:53:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from chilco.textdrive.com (chilco.textdrive.com [207.7.108.242]) by postgresql.org (Postfix) with ESMTP id CF8DD9FA2BC for ; Mon, 22 May 2006 21:53:07 -0300 (ADT) Received: from [192.168.1.109] (unknown [209.149.57.250]) by chilco.textdrive.com (Postfix) with ESMTP id 89287DB796 for ; Tue, 23 May 2006 00:53:05 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: <3BB218ED-FD62-42BF-8BDD-066954F961AC@sitening.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: pgsql-admin@postgresql.org From: "Thomas F. O'Connell" Subject: Unkillable Backend Processes Date: Mon, 22 May 2006 19:53:00 -0500 X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/298 X-Sequence-Number: 21830 I've encountered an oddity on a postgres cluster that results in an unresponsive postmaster and, frequently, unkillable backend processes. I'm having a difficult time isolating the queries that are related to this scenario because by the time the scenario occurs, max_connections have been reached, and no superuser connections are available. Because the query doesn't finish, I don't think it's getting logged (since logging is only done at the query level on a duration or error basis). In the current iteration, I can tell that it's an INSERT that's causing the problem, and the INSERT is coming from an Apache process on a machine on the same network. In recent occurrences, though, I'm almost positive I've seen a SELECT. But as troubled as I am by the cause, I'm similarly troubled by my inability to treat the symptoms effectively. When this occurs, I have tried shutting down the pgpools and postmaster (using pg_ctl). Unfortunately, pgpool frequently hangs during the shutdown attempt. When I kill these off individually using kill and then shut down the postmaster with pg_ctl immediate mode, I will occasionally find a backend process that cannot be killed, even with a KILL (-9) signal. Is this likely to be caused by something at a lower level than postgres? Here are the specs: PostgreSQL 8.1.3 pgpool 3.0.1 Debian GNU/Linux 3.1 Linux 2.6.10 #8 SMP system: ext3 RAID 1 WAL: jfs RAID 10 data: jfs RAID 10 There's also an NFS mount point. I'm still trying to do the forensics on the root cause (a related oddity: the system can run in production for days or weeks without any issues), but I'm just as interested in why I can't kill postgres backend processes that have no postmaster. If I can provide more information related to recovery, please let me know. -- Thomas F. O'Connell Database Architecture and Programming Sitening, LLC http://www.sitening.com/ 3004 B Poston Avenue Nashville, TN 37203-1314 615-260-0005 (cell) 615-469-5150 (office) 615-469-5151 (fax)