Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 59D482E2E71 for ; Thu, 15 Nov 2007 12:03:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 03551-05 for ; Thu, 15 Nov 2007 12:03:14 -0400 (AST) Received: from smtp150.iad.emailsrvr.com (smtp150.iad.emailsrvr.com [207.97.245.150]) by postgresql.org (Postfix) with ESMTP id 18C9E2E2DEE for ; Thu, 15 Nov 2007 12:03:31 -0400 (AST) Received: from relay5.relay.iad.emailsrvr.com (localhost [127.0.0.1]) by relay5.relay.iad.emailsrvr.com (SMTP Server) with ESMTP id 9DF08654B73; Thu, 15 Nov 2007 11:03:01 -0500 (EST) Received: by relay5.relay.iad.emailsrvr.com (Authenticated sender: erik-AT-myemma.com) with ESMTP id 5904A655402; Thu, 15 Nov 2007 11:03:01 -0500 (EST) In-Reply-To: <16999.1195080384@sss.pgh.pa.us> References: <4735DBDB.5050208@verizon.net> <16627.1194714491@sss.pgh.pa.us> <4735FA9F.1080805@verizon.net> <473A5CC0.3060003@verizon.net> <473AE63D.7090305@verizon.net> <20071114152249.GA16041@crankycanuck.ca> <473B2A1F.30804@verizon.net> <473B6C9D.1020804@pws.com.au> <16999.1195080384@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <91BAAA02-1019-4FB1-AF2B-38BEDB32298C@myemma.com> Cc: Russell Smith , Jean-David Beyer , pgsql-performance@postgresql.org Content-Transfer-Encoding: quoted-printable From: Erik Jones Subject: Re: Curious about dead rows. Date: Thu, 15 Nov 2007 10:02:36 -0600 To: Tom Lane X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/233 X-Sequence-Number: 27648 On Nov 14, 2007, at 4:46 PM, Tom Lane wrote: > Russell Smith writes: >> It is possible that analyze is not getting the number of dead rows =20= >> right? > > Hah, I think you are on to something. ANALYZE is telling the truth > about how many "dead" rows it saw, but its notion of "dead" is "not =20= > good > according to SnapshotNow". Thus, rows inserted by a not-yet-committed > transaction would be counted as dead. So if these are background > auto-analyzes being done in parallel with inserting transactions that > run for awhile, seeing a few not-yet-committed rows would be > unsurprising. Wouldn't this result in a variable number of dead rows being reported =20= on separate runs including zero while no pending inserts are =20 happening? This may be a good way to verify that this is what is =20 happening if he can quiet down his app long enough to run an ANALYZE =20 in isolation. Perhaps, if the ANALYZE runs fast enough he can just =20 lock the table for the run. Erik Jones Software Developer | Emma=AE erik@myemma.com 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com