Re: visibility maps

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: visibility maps
Date: 2008-12-17 09:59:31
Message-ID: 4948CD83.4010905@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavan Deolasee wrote:
> Another thing I noticed is the since VACUUM tries to set the bit in
> the first phase, it's working only because HOT prunes DEAD tuples just
> before we do another scan on line pointers (which I had earlier talked
> about getting rid of. May be its time I do that). Otherwise, the
> visibility bit won't be set even though the DEAD tuples will be
> removed in the second scan and the rest are all LIVE tuples. So if we
> at all want to take out the another scan of line pointers from the
> first pass, we should rather push the work setting bits in the prune
> code.

I don't quite understand this paragraph. If there's any DEAD tuples or
line-pointers, the all-visible flag can't be set. After an UPDATE or
DELETE, it indeed takes two vacuums until the bits in the visibility map
are set.

Or did you mean that it only works because the prune phase sets the hint
bits on the tuples? HeapTupleSatisfiesVacuum sets them too, so we're not
relying on the prune phase to set them.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2008-12-17 10:14:04 Re: visibility maps
Previous Message Heikki Linnakangas 2008-12-17 09:40:33 Visibility map and freezing