Re: heap vacuum & cleanup locks

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: heap vacuum & cleanup locks
Date: 2011-06-06 04:19:41
Message-ID: BANLkTikfXjmOVrV2O40yUJ4BYjX9aUh7=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 5, 2011 at 12:03, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> If other buffer pins do exist, then we can't
> defragment the page, but that doesn't mean no useful work can be done:
> we can still mark used line pointers dead, or dead line pointers
> unused.  We cannot defragment, but that can be done either by the next
> VACUUM or by a HOT cleanup.

This is just an idea -- Is it possible to have copy-on-write techniques?
VACUUM allocates a duplicated page for the pinned page, and copy valid
tuples into the new page. Following buffer readers after the VACUUM will
see the cloned page instead of the old pinned one.

Of course, copy-on-writing is more complex than skipping pinned pages,
but I wonder we cannot vacuum at all in some edge cases with the
skipping method.

--
Itagaki Takahiro

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Darren Duncan 2011-06-06 04:51:57 Re: Range Types and extensions
Previous Message Robert Haas 2011-06-06 04:12:32 Re: reducing the overhead of frequent table locks - now, with WIP patch