Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E266CFD3E1E for ; Tue, 12 Jun 2012 13:51:11 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SeUJB-0005we-JS for pgsql-admin@postgresql.org; Tue, 12 Jun 2012 16:51:11 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q5CGotp8018648; Tue, 12 Jun 2012 12:50:55 -0400 (EDT) From: Tom Lane To: Rural Hunter cc: pgsql-admin@postgresql.org Subject: Re: Why auto vacuum almost running all the time on one toast table? In-reply-to: <4FD6F4B3.8050509@gmail.com> References: <4FD6F4B3.8050509@gmail.com> Comments: In-reply-to Rural Hunter message dated "Tue, 12 Jun 2012 15:50:11 +0800" Date: Tue, 12 Jun 2012 12:50:55 -0400 Message-ID: <18647.1339519855@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/61 X-Sequence-Number: 39652 Rural Hunter writes: > v9.1.3 on Ubuntu 10.04 server. I have one table which has frequent > insert and weekly deletion, no update. Recently, I found the auto vacuum > on the toast table of it almost running all the time. each run took > around 1 hour. I don't think there are so many inerts so that it reaches > the auto vacuum criteria(20%? changes). And there is no such frequent > auto vacuum on the main table. The last auto vacuum of the main table is > on 3rd Jun. what might cause this behavior? Hm, is the autovacuum managing to complete, or is it getting kicked off before it can complete? It would help to see the messages those CONTEXT lines are attached to; and/or you might check pg_stat_all_tables to see when the last completed autovacuum was for both the main table and its toast table. regards, tom lane