X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D656153557 for ; Wed, 20 Apr 2005 16:28:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18633-09 for ; Wed, 20 Apr 2005 19:28:53 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by svr1.postgresql.org (Postfix) with ESMTP id 7334552967 for ; Wed, 20 Apr 2005 16:28:50 -0300 (ADT) Received: from pimout5-ext.prodigy.net (pimout5-ext.prodigy.net [207.115.63.73]) by ylpvm43.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j3KJSsl8006284 for ; Wed, 20 Apr 2005 15:28:54 -0400 X-ORBL: [69.235.29.228] Received: from [192.168.1.103] (adsl-69-235-29-228.dsl.irvnca.pacbell.net [69.235.29.228]) by pimout5-ext.prodigy.net (8.12.10 milter /8.12.10) with ESMTP id j3KJSk0E056972 for ; Wed, 20 Apr 2005 15:28:51 -0400 Mime-Version: 1.0 (Apple Message framework v622) Content-Transfer-Encoding: 7bit Message-Id: <6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: pgsql-performance@postgresql.org From: Richard Plotkin Subject: Disk filling, CPU filling, renegade inserts and deletes? Date: Wed, 20 Apr 2005 12:28:45 -0700 X-Mailer: Apple Mail (2.622) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/527 X-Sequence-Number: 11924 Hi, I'm having a pretty serious problem with postgresql's performance. Currently, I have a cron task that is set to restart and vacuumdb -faz every six hours. If that doesn't happen, the disk goes from 10% full to 95% full within 2 days (and it's a 90GB disk...with the database being a 2MB download after dump), and the CPU goes from running at around a 2% load to a 99+% load right away (the stats look like a square wave). So it's problem-hunting time, I guess. The problem has something to do with the following errors (there are a lot; I'm posting a short sample) NOTICE: relation "pg_depend" TID 43/27: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_depend" TID 43/28: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_depend" TID 43/29: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_depend" TID 43/30: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_depend" TID 43/31: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_depend" TID 43/32: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_type" TID 17/44: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_type" TID 17/45: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/11: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/12: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/13: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/14: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/15: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/16: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_attribute" TID 133/17: InsertTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_class" TID 41/18: DeleteTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_class" TID 41/19: DeleteTransactionInProgress 209545 --- can't shrink relation NOTICE: relation "pg_class" TID 41/20: DeleteTransactionInProgress 209545 --- can't shrink relation When I vacuum full, I can't get rid of these errors unless I restart the database (and then I restart, vacuum full, and everything's fine). And once I do a successful vacuum full, CPU usage returns to normal, and the disk is no longer almost full (back to 10% full). I'm at a loss to figure out where the problem is coming from and how to fix it. My machine: XServe G5 Dual 2GHz running Mac OS X Server 10.3.9. Postgresql 8.0.1 Thanks for any responses/ideas/solutions (best of all!), Richard