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

Re: [HACKERS] ANALYZE getting dead tuple counthopelessly wrong

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 counthopelessly wrong
Date: 2008-04-01 08:04:21
Message-ID: 1207037061.4238.8.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Tue, 2008-04-01 at 13:07 +0530, Pavan Deolasee wrote:

> Please see the attached patch. One change I made is to hold the SHARE lock
> on the page while ANALYZE is reading tuples from it. I thought it would
> be a right thing to do instead of repeatedly acquiring/releasing the lock.

ANALYZE is a secondary task and so we shouldn't be speeding it up at the
possible expense of other primary tasks. So I think holding locks for
longer than minimum is not good in this case and I see no reason to make
the change described.

We can speed up ANALYZE by using the background reader to preread the
blocks, assuming bgreader will happen one day.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com 

  PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


In response to

Responses

pgsql-hackers by date

Next:From: NikhilSDate: 2008-04-01 08:40:02
Subject: Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Previous:From: Pavan DeolaseeDate: 2008-04-01 07:37:20
Subject: Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong

pgsql-general by date

Next:From: markDate: 2008-04-01 08:09:23
Subject: Re: simple update queries take a long time - postgres 8.3.1
Previous:From: markDate: 2008-04-01 07:44:00
Subject: Re: simple update queries take a long time - postgres 8.3.1

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