On Thu, Jul 21, 2011 at 4:01 PM, Robert Haas <robertmh...@gmail.com> wrote:
> > > I think we are better off doing only equality comparisons and dodging > this problem altogether. > > Fair enough. > > Just-plain-dead line pointers would have lp_off = 0. Dead-vacuumed > line pointers would have lp_off != 0. The first vacuum would use > lp_off = 1, the next one lp_off = 2, etc. > > Actually, come to think of it, we could fit a 30-bit counter into the > line pointer. There are 15 unused bits in lp_off and 15 unused bits > in lp_len. > > Thats clever! I think we can go this path and completely avoid any special area or additional header fields. > > If we use a counter that is large enough that we don't have to worry > about wrap-around, I guess that's OK, though it seems a little weird > to think about having different backends running with different ideas > about the correct counter value. > > I think thats fine. For example, every backend runs with a different RecentXmin today and that doesn't impact any functionality. It only limits how much they can prune at any given time. The same would happen by having a stale counter. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com