Re: visibility maps - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: visibility maps
Date
Msg-id 4948CD83.4010905@enterprisedb.com
Whole thread Raw
In response to Re: visibility maps  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: visibility maps
List 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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Visibility map and freezing
Next
From: "Pavan Deolasee"
Date:
Subject: Re: visibility maps