Re: Set visibility map bit after HOT prune - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Set visibility map bit after HOT prune
Date
Msg-id CABOikdO-x5NCUZAesE93J2i60D0BuJCdLrP_1NPNMALdU=ab6A@mail.gmail.com
Whole thread Raw
In response to Re: Set visibility map bit after HOT prune  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Set visibility map bit after HOT prune
List pgsql-hackers
On Sun, Dec 16, 2012 at 3:10 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>
>
> As explained above, I disagree that it looks like a good idea, and
> you've shown no evidence it would be or is true.
>

Lets separate out these two issues. What you are suggesting as a
follow up to Tom's idea, I've no objection to that and that might be
worthwhile optimisation to try out. But this patch itself does not
attempt to deal with that and its a separate work item and will
require invasive changes and tests.

*Whenever* we HOT prune, either in SELECT path or UPDATE path, what
I'm suggesting is lets try to set the visibility map bit if the
conditions are favorable. The only extra work that we are doing (as in
the submitted patch) is to check few additional things for LIVE tuples
such as if xmin precedes the OldestXmin or not. That itself does not
seem too costly. What we gain is: 1. next vacuum may skip that page
because its marked all-visible and 2. index-only scan will not visit
the heap page. These two improvements will avoid an useless heap page
IO and may justify a little more work in HOT prune.

Thanks,
Pavan

-- 
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Assert for frontend programs?
Next
From: Simon Riggs
Date:
Subject: Re: Set visibility map bit after HOT prune