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

Re: Index vacuum improvements

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index vacuum improvements
Date: 2006-03-29 23:19:49
Message-ID: 1143674389.32384.390.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2006-03-29 at 16:49 -0500, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> > 1. Instead of stopping on the first matching tuple, scan the whole index 
> > page for all matching entries at once.
> 
> That loses the ability to reflect tuple deadness back into LP_DELETE
> flags, no?  Which is a problem already for bitmap indexscans, but I
> don't wish to give it up for regular indexscans too.  With a solution
> for that it might be workable, but I don't see what we do about that.

OK, I was thinking this would mean we'd need to scan the whole page
making this less efficient for nearly unique index access. But it
doesn't at all - we can still probe to start and scan from there.

Sequential access within the block would mean hardware cache prefetch
would kick-in for many scans.

If we did do this, the access would be so much more efficient that we
would have enough time to take additional actions to record LP_DELETE
flags, when dead tuples exist. Certainly it would be better to make a
single return visit to the block and record *all* LP_DELETEs found in
one go, rather than dirty the block once for each index_getnext and
potentially have it written out more than once as we scan it. Perhaps
use a heuristic of if > 3 LP_DELETEs found make a return visit to the
block to set them. 

Best Regards, Simon Riggs


In response to

pgsql-hackers by date

Next:From: Philip YarraDate: 2006-03-30 00:46:45
Subject: Re: Tablespaces oddity?
Previous:From: David FetterDate: 2006-03-29 22:25:08
Subject: Re: Win32 sysconfig -> pg_service.conf

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