Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D22DD9FB258 for ; Wed, 25 Oct 2006 16:57:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 66687-03 for ; Wed, 25 Oct 2006 19:57:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id D45239FB255 for ; Wed, 25 Oct 2006 16:57:24 -0300 (ADT) Received: from [192.168.1.95] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k9PJvOuw013567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Oct 2006 12:57:25 -0700 Message-ID: <453FC1CF.4030208@commandprompt.com> Date: Wed, 25 Oct 2006 12:58:07 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: Mike Goldner CC: pgsql-admin@postgresql.org Subject: Re: Vacuum Problems (locking) References: <1161806057.2095.154.camel@localhost.localdomain> In-Reply-To: <1161806057.2095.154.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 25 Oct 2006 12:57:26 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/164 X-Sequence-Number: 23467 Mike Goldner wrote: > I have a nightly vacuum scheduled as follows: > > su - postgres -c "/usr/bin/vacuumdb --analyze --dbname=mydb" > > Last night, it appears that the vacuum blocked db access from my > application server (JBoss). Here is the logfile snippet: > > [3693-jbossdb-postgres-2006-10-25 06:52:29.488 EDT]NOTICE: number of > page slots needed (559472) exceeds max_fsm_pages (200000) > [3693-jbossdb-postgres-2006-10-25 06:52:29.488 EDT]HINT: Consider > increasing the configuration parameter "max_fsm_pages" to a value over > 559472. > [3693-jbossdb-postgres-2006-10-25 06:52:29.488 EDT]LOG: number of page > slots needed (559472) exceeds max_fsm_pages (200000) > [3693-jbossdb-postgres-2006-10-25 06:52:29.488 EDT]HINT: Consider > increasing the configuration parameter "max_fsm_pages" to a value over > 559472. > [3693-jbossdb-postgres-2006-10-25 06:52:29.530 EDT]LOG: transaction ID > wrap limit is 1073813592, limited by database "benchpg" > [3693-jbossdb-postgres-2006-10-25 06:52:29.530 EDT]LOG: transaction ID > wrap limit is 1073813592, limited by database "benchpg" > [3693-jbossdb-postgres-2006-10-25 06:52:29.530 EDT]LOG: duration: > 10224738.050 ms statement: VACUUM ANALYZE; > > First of all, my max_fsm_pages is obviously way off. However, every > time I increase my max_fsm_pages the next vacuum says that it requires > more. Will there every be a plateau in the requested pages? What is > the impact of exceeding the pages slots needed? You will need to vacuum full and if your need continues to grow, you need to vacuum more. > The only semi-unusual characteristic of my database is that I have one > table in particular that grows and shrinks dramatically. My entire > database after a vacuum --full is about 8GB. However, after a day or > two, the db will grow as large as 75GB. Truncating that one table > (since it empties regularly) will shrink the db right back to the 8GB. Vacuum that single table, ALOT. Sincerely, Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate