Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 081666326E2 for ; Sat, 1 May 2010 14:26:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 18867-02 for ; Sat, 1 May 2010 17:26:14 +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 D8B8063250C for ; Sat, 1 May 2010 14:26:13 -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 o41HPejp005267; Sat, 1 May 2010 13:25:41 -0400 (EDT) To: Greg Smith cc: Robert Haas , Josh Berkus , Rick , pgsql-performance@postgresql.org Subject: Re: autovacuum strategy / parameters In-reply-to: <4BDC60A9.60108@2ndquadrant.com> References: <65d9d15d-41d2-4bfa-8cc3-6148b4fb9022@z3g2000yqz.googlegroups.com> <4BDB5ECE.4010607@agliodbs.com> <4BDC60A9.60108@2ndquadrant.com> Comments: In-reply-to Greg Smith message dated "Sat, 01 May 2010 13:11:05 -0400" Date: Sat, 01 May 2010 13:25:40 -0400 Message-ID: <5266.1272734740@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.872 tagged_above=-10 required=5 tests=AWL=0.038, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/8 X-Sequence-Number: 38592 Greg Smith writes: > If anything, I'd expect people to want to increase how often it runs, > for tables where much less than 20% dead is a problem. The most common > situation I've seen where that's the case is when you have a hotspot of > heavily updated rows in a large table, and this may match some of the > situations that Robert was alluding to seeing. Let's say you have a big > table where 0.5% of the users each update their respective records > heavily, averaging 30 times each. That's only going to result in 15% > dead rows, so no autovacuum. But latency for those users will suffer > greatly, because they might have to do lots of seeking around to get > their little slice of the data. With a little luck, HOT will alleviate that case, since HOT updates can be reclaimed without running vacuum per se. I agree there's a risk there though. Now that partial vacuum is available, it'd be a real good thing to revisit these numbers. regards, tom lane