Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Stuart Brooks" <stuartb(at)cat(dot)co(dot)za>, pgsql-general(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong
Date: 2008-03-31 18:34:25
Message-ID: 2e78013d0803311134v44604be5l20e97ee7d3461ec4@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Mon, Mar 31, 2008 at 9:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
>  [ Please see if you can stop using the "redirected dead" terminology ]
>
>

Apologies, will keep that in mind. Seems like a hang-over from the past :-)

>  Yeah, I think I agree.  The page pruning code is set up so that changing
>  a line pointer to DEAD state doesn't change the count of dead tuples in
>  the table, so we are counting unreclaimed DEAD pointers as still being
>  dead tuples requiring VACUUM.  ANALYZE should surely not affect that.
>
>  It looks like there's no trivial way to get ANALYZE to do things that
>  way, though.  heap_release_fetch() doesn't distinguish a DEAD line
>  pointer from an unused or redirected one.  But in the current
>  implementation of ANALYZE there's really no benefit to using
>  heap_release_fetch anyway --- it always examines all line pointers
>  on each selected page, so we might as well rewrite it to use a simple
>  loop more like vacuum uses.
>

I agree. I would write a patch on these lines, unless you are already on to it.


Thanks,
Pavan

-- 
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Stephen FrostDate: 2008-03-31 18:40:11
Subject: Re: Patch for pg_dump (function dumps)
Previous:From: sanjay sharmaDate: 2008-03-31 18:21:06
Subject: Re: Submission of Feature Request : RFC- for Implementing Transparent Data Encryption in P

pgsql-general by date

Next:From: Just SomeoneDate: 2008-03-31 19:02:07
Subject: Re: Very slow catalog query
Previous:From: Tom LaneDate: 2008-03-31 18:10:35
Subject: Re: Can Postgres 8.x start if some disks containing tablespaces are not mounted?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group