Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EA2E26331A8 for ; Wed, 15 Apr 2009 00:47:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65505-04 for ; Wed, 15 Apr 2009 00:47:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mail.postgresql.org (Postfix) with ESMTP id CB502632E2F for ; Wed, 15 Apr 2009 00:47:02 -0300 (ADT) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 6AB309DA80 for ; Tue, 14 Apr 2009 20:46:59 -0700 (PDT) X-Client-Authorized: MaGic Cook1e Received: from [192.168.1.109] (adsl-71-135-161-147.dsl.pltn13.pacbell.net [71.135.161.147]) by idiom.com (Postfix) with ESMTP id 5AAF72D60DD for ; Tue, 14 Apr 2009 20:46:54 -0700 (PDT) Message-ID: <49E558B2.8000600@obviously.com> Date: Tue, 14 Apr 2009 20:46:58 -0700 From: Bryce Nesbitt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081213 SUSE/1.1.14-1.1 SeaMonkey/1.1.14 MIME-Version: 1.0 To: sql pgsql Subject: Postgres process resident size does not drop after killing statement Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/76 X-Sequence-Number: 32422 Every so often our production Postgres 8.3 system will get statement that runs for a few hours, or a few days, or more, and needs to be killed dead. We kill it with pg_cancel_backend(), and cpu usage of the process immediately drops, and the process starts serving other statements. But the curious thing is the resident size does not drop. Is this normal? Something to be concerned about? Here's a mild example (only 2.8 gigs): # top PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20108 postgres 16 0 4305m 2.8g 2.8g D 4 8.6 3:12.50 postgres: production production 10.100.4.11(44200) SELECT 16306 postgres 15 0 4248m 1.5g 1.5g S 0 4.7 0:47.70 postgres: jira jira 10.100.5.12(57517) idle 28472 postgres 15 0 4249m 1.4g 1.4g S 2 4.6 0:16.18 postgres: production production 10.100.4.11(48457) idle # uname -a Linux xxxx 2.6.18-6-amd64 #1 SMP Thu Dec 25 21:08:54 UTC 2008 x86_64 GNU/Linux