Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 4B9FC9FC20B for ; Fri, 25 May 2007 11:19:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 17963-04 for ; Fri, 25 May 2007 11:18:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D58A19FC11A for ; Fri, 25 May 2007 11:18:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4PEIjv4008589; Fri, 25 May 2007 10:18:45 -0400 (EDT) To: Bastian Voigt cc: pgsql-performance@postgresql.org Subject: Re: Performance Problem with Vacuum of bytea table (PG 8.0.13) In-reply-to: <46569E6A.2060509@bastian-voigt.de> References: <46569E6A.2060509@bastian-voigt.de> Comments: In-reply-to Bastian Voigt message dated "Fri, 25 May 2007 10:29:30 +0200" Date: Fri, 25 May 2007 10:18:45 -0400 Message-ID: <8588.1180102725@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/511 X-Sequence-Number: 24901 Bastian Voigt writes: > Now my big big problem is that the database gets really really slow > during these 20 minutes and after the vacuum process is running for a > short time, many transactions show state "UPDATE waiting" in the process > list. In my Java application server I sometimes get tons of deadlock > Exceptions (waiting on ShareLock blahblah). The web frontend gets nearly > unusable, logging in takes more than 60 seconds, etc. etc. Hmm. That's a bit weird --- what are they waiting on exactly? Look in pg_locks to see what the situation is. A vacuum per se ought not be blocking any updates. Aside from the recommendation to make the vacuums happen more frequently instead of less so, you should experiment with vacuum_cost_delay and related parameters. The idea is to reduce vacuum's I/O load so that it doesn't hurt foreground response time. This means any individual vacuum will take longer, but you won't need to care. regards, tom lane