From: Erik Jones <erik@myemma.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Russell Smith <mr-russ@pws.com.au>
Cc: Jean-David Beyer <jeandavid8@verizon.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Curious about dead rows.
Date: Thu, 15 Nov 2007 10:02:36 -0600
Message-ID: <91BAAA02-1019-4FB1-AF2B-38BEDB32298C@myemma.com> (raw)
In-Reply-To: <16999.1195080384@sss.pgh.pa.us>
References: <4735DBDB.5050208@verizon.net>
<16627.1194714491@sss.pgh.pa.us>
<4735FA9F.1080805@verizon.net>
<b42b73150711131628q1469df3el6f557e10de07a05@mail.gmail.com>
<473A5CC0.3060003@verizon.net>
<b42b73150711131936l65b97b9ya7953383673b2710@mail.gmail.com>
<473AE63D.7090305@verizon.net>
<20071114152249.GA16041@crankycanuck.ca>
<473B2A1F.30804@verizon.net>
<473B6C9D.1020804@pws.com.au>
<16999.1195080384@sss.pgh.pa.us>
On Nov 14, 2007, at 4:46 PM, Tom Lane wrote:
> Russell Smith <mr-russ@pws.com.au> writes:
>> It is possible that analyze is not getting the number of dead rows
>> 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
> 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
on separate runs including zero while no pending inserts are
happening? This may be a good way to verify that this is what is
happening if he can quiet down his app long enough to run an ANALYZE
in isolation. Perhaps, if the ANALYZE runs fast enough he can just
lock the table for the run.
Erik Jones
Software Developer | Emma®
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: erik@myemma.com, tgl@sss.pgh.pa.us, mr-russ@pws.com.au, jeandavid8@verizon.net
Subject: Re: Curious about dead rows.
In-Reply-To: <91BAAA02-1019-4FB1-AF2B-38BEDB32298C@myemma.com>
References: <4735DBDB.5050208@verizon.net> <16627.1194714491@sss.pgh.pa.us> <4735FA9F.1080805@verizon.net> <b42b73150711131628q1469df3el6f557e10de07a05@mail.gmail.com> <473A5CC0.3060003@verizon.net> <b42b73150711131936l65b97b9ya7953383673b2710@mail.gmail.com> <473AE63D.7090305@verizon.net> <20071114152249.GA16041@crankycanuck.ca> <473B2A1F.30804@verizon.net> <473B6C9D.1020804@pws.com.au> <16999.1195080384@sss.pgh.pa.us> <91BAAA02-1019-4FB1-AF2B-38BEDB32298C@myemma.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox