Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGUSW-0003x6-Ah for pgsql-performance@postgresql.org; Tue, 25 Sep 2012 12:41:52 +0000 Received: from mailout-us.gmx.com ([74.208.5.67]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TGUSU-00062l-Ho for pgsql-performance@postgresql.org; Tue, 25 Sep 2012 12:41:51 +0000 Received: (qmail 15979 invoked by uid 0); 25 Sep 2012 12:40:55 -0000 Received: from 76.255.19.161 by rms-us006 with HTTP Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset="utf-8" Date: Tue, 25 Sep 2012 08:40:55 -0400 From: "Kevin Grittner" Message-ID: <20120925124055.241320@gmx.com> MIME-Version: 1.0 Subject: Re: Postgres becoming slow, only full vacuum fixes it To: "Kiriakos Tsourapas" ,"Mark Kirkwood" X-Authenticated: #138763884 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: AMMTcCA/3zOlOQ09Lnwheml+IGRvb8AK X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/120 X-Sequence-Number: 47866 Kiriakos Tsourapas wrote: > When the problem appears, vacuuming is not helping. I ran vacuum > manually and the problem was still there. Only full vacuum worked. > > As far as I have understood, autovacuuming is NOT doing FULL > vacuum. So, messing around with its values should not help me in > any way. That is absolutely wrong.  A regular vacuum, or autovacuum not hopelessly crippled by your configuration, will prevent the table bloat which is slowing things down.  It does not, however, fix bloat once it has occurred; a normal vacuum then is like closing the barn door after the horse has already bolted -- it would have prevented the problem if done in time, but it won't cure it. A VACUUM FULL in version 8.4 will fix bloat of the table's heap, but will tend to bloat the indexes.  You should probably fix your autovcauum configuration (making it *at least* as aggressive as the default), CLUSTER the affected table(s) to fix both table and index bloat, and schedule an upgrade to the latest bug fix release of major version 8.4. http://www.postgresql.org/support/versioning/ Minor releases (where the version number only changes after the second dot) only contain fixes for bugs and security problems, and never require a dump/load or pg_upgrade run.  If you insist on running with known bugs, you can expect problems. -Kevin