Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C0BDA2E30D8 for ; Thu, 13 Dec 2007 14:12:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21595-03 for ; Thu, 13 Dec 2007 14:12:27 -0400 (AST) Received: from outmail128076.authsmtp.com (outmail128076.authsmtp.com [62.13.128.76]) by postgresql.org (Postfix) with ESMTP id EC77C2E2FA6 for ; Thu, 13 Dec 2007 14:12:28 -0400 (AST) Received: from outmail128175.authsmtp.net (outmail128175.authsmtp.net [62.13.128.175]) by punt4.authsmtp.com (8.14.1/8.14.1/Kp) with ESMTP id lBDICPeV058553; Thu, 13 Dec 2007 18:12:27 GMT Received: from [192.168.0.3] (85-211-24-246.dyn.gotadsl.co.uk [85.211.24.246]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id lBDICKAa077869; Thu, 13 Dec 2007 18:12:20 GMT Subject: Re: Heavy write activity on first vacuum of fresh TOAST data From: Simon Riggs To: Kevin Grittner Cc: pgsql-performance@postgresql.org In-Reply-To: <47611B9D.EE98.0025.0@wicourts.gov> References: <4760FF69.EE98.0025.0@wicourts.gov> <1197562283.4255.1829.camel@ebony.site> <47611B9D.EE98.0025.0@wicourts.gov> Content-Type: text/plain Date: Thu, 13 Dec 2007 18:12:44 +0000 Message-Id: <1197569564.4255.1855.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: f2b5bbb8-a9a6-11dc-814e-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQZbaVxS HGQLW1NEUVV7WGF/ aQsfZQBDYEtPQQdu TkpNRE1QERpoT0Bz cmdtKWgjdwJBcHh5 K0dqWHIVCkYocBQv EEZJRGRXY3phaTRM TUhZc1ZJcANLfxdA PlN4UyBcLwdSbGoL JyIJERcLGAAXCClc XBBFMkgTXUtDFzUg Rg4DASRnGktNSSQp NABuNFcXAVsUekI8 eVU7VEkYeyM1IzZi fSBBCTNQT2wg X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:787/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/194 X-Sequence-Number: 28010 On Thu, 2007-12-13 at 11:46 -0600, Kevin Grittner wrote: > >>> On Thu, Dec 13, 2007 at 10:11 AM, in message > <1197562283.4255.1829.camel@ebony.site>, Simon Riggs > wrote: > > On Thu, 2007-12-13 at 09:46 -0600, Kevin Grittner wrote: > > > >> The data was inserted through a Java program using a prepared > >> statement with no indexes on the table. The primary key was then > >> added, and now I've started a vacuum. The new table wound up being > >> the first big table vacuumed, and I noticed something odd. Even > >> though there have been no rollbacks, updates, or deletes on this > >> table, the vacuum is writing as much as it is reading while dealing > >> with the TOAST data. > > > > Writing hint bits. Annoying isn't it? :-( > > Is there anything in the documentation that mentions this pattern > of activity? Since I started clearing the WAL file tails before > compression, it has surprised me how much WAL file activity there > is from the nightly vacuum. I had assumed that some part of this > was freezing old tuples, but that didn't seem to exactly match the > pattern of activity. If the hint bit changes are written to the > WAL, I think this explains it. They're not. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com