Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DCEF2632414 for ; Thu, 15 Apr 2010 19:48:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70501-01 for ; Thu, 15 Apr 2010 22:48:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 5AA1363219C for ; Thu, 15 Apr 2010 19:48:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o3FMmHOq026179; Thu, 15 Apr 2010 18:48:17 -0400 (EDT) To: Josh Berkus cc: Alvaro Herrera , pgsql-performance@postgresql.org Subject: Re: Autovaccum with cost_delay does not complete on one solaris 5.10 machine In-reply-to: <4BC79072.10901@agliodbs.com> References: <4BC76C9F.1020200@agliodbs.com> <20100415200056.GJ7259@alvh.no-ip.org> <16088.1271362441@sss.pgh.pa.us> <20100415202405.GL7259@alvh.no-ip.org> <4BC79072.10901@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Thu, 15 Apr 2010 15:17:22 -0700" Date: Thu, 15 Apr 2010 18:48:17 -0400 Message-ID: <26178.1271371697@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/195 X-Sequence-Number: 38445 Josh Berkus writes: >> But it shouldn't >> be sleeping after each page with normal cost_delay parameters, should it? > Right, that's why I find this puzzling. If the problem was easier to > reproduce it would be easier to analyze. The behavior would be explained if VacuumCostLimit were getting set to zero (or some unreasonably small value) in the autovac worker process. I looked at the autovac code that manages that, and it seems complicated enough that a bug wouldn't surprise me in the least. I especially note that wi_cost_limit is explicitly initialized to zero, rather than something sane; and that table_recheck_autovac falls back to setting vac_cost_limit from the previous value of VacuumCostLimit ... which is NOT constant but in general is left over from the previously processed table. One should also keep in mind that SIGHUP processing might reload VacuumCostLimit from GUC values. So I think that area needs a closer look. Josh, are you sure that both servers are identical in terms of both GUC-related and per-table autovacuum settings? regards, tom lane