Re: Curious about dead rows. - Mailing list pgsql-performance

From Tom Lane
Subject Re: Curious about dead rows.
Date
Msg-id 16999.1195080384@sss.pgh.pa.us
Whole thread Raw
In response to Re: Curious about dead rows.  (Russell Smith <mr-russ@pws.com.au>)
Responses Re: Curious about dead rows.  (Jean-David Beyer <jeandavid8@verizon.net>)
Re: Curious about dead rows.  (Erik Jones <erik@myemma.com>)
Re: Curious about dead rows.  (Brad Nicholson <bnichols@ca.afilias.info>)
List pgsql-performance
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.

I wonder if that is worth fixing?  I'm not especially concerned about
the cosmetic aspect of it, but if we mistakenly launch an autovacuum
on the strength of an inflated estimate of dead rows, that could be
costly.

            regards, tom lane

pgsql-performance by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: dell versus hp
Next
From: "Merlin Moncure"
Date:
Subject: Re: dell versus hp