Re: Single pass vacuum - take 1

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Single pass vacuum - take 1
Date: 2011-07-21 20:19:26
Message-ID: CABOikdNjwpP-uT18cksCrcu7SXLa1p571UHnzJ0JdFdoiNWvbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 21, 2011 at 4:01 PM, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-07-21 20:54:31 Re: sinval synchronization considered harmful
Previous Message Robert Haas 2011-07-21 20:02:35 Re: sinval synchronization considered harmful