Re: visibility maps - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: visibility maps
Date
Msg-id 2e78013d0812170214y389393fft524adb5d8d31fe17@mail.gmail.com
Whole thread Raw
In response to Re: visibility maps  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: visibility maps  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Dec 17, 2008 at 3:29 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
>
>
> 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.
>

No, I am saying, HOT-prune removes all DEAD tuples from the page (not
the DEAD line pointers though) and that's why you may not need two
vacuums for the visibility bit to set because the first phase of
vacuum would not find any DEAD tuples. Without HOT prune, two vacuums
will be required to set the bit and that would be counter intuitive
because somebody who has just run vacuum on the table would expect the
next vacuum to be no-op if there are no updates/deletes in between.

Thanks,
Pavan

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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: visibility maps
Next
From: Zdenek Kotala
Date:
Subject: Re: WIP: pre-upgrade page reservation