From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: getting rid of freezing |
Date: | 2013-05-23 19:03:29 |
Message-ID: | 20130523190329.GC29374@alap2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-05-23 19:51:48 +0200, Andres Freund wrote:
> We currently need to make sure we scanned the whole relation and have
> frozen everything to have a sensible relfrozenxid for a relation.
>
> So, what I propose instead is basically:
> 1) only vacuum non-all-visible pages, even when doing it for
> anti-wraparound
> 2) When we can set all-visible guarantee that all tuples on the page are
> fully hinted. During recovery do the same, so we don't need to log
> all hint bits.
> We can do this with only an exclusive lock on the buffer, we don't
> need a cleanup lock.
> 3) When we cannot mark a page all-visible or we cannot get the cleanup
> lock, remember the oldest xmin on that page. We could set all visible
> in the former case, but we want the page to be cleaned up sometime
> soonish.
> 4) If we can get the cleanup lock, purge dead tuples from the page and
> the indexes, just as today. Set the page as all-visible.
>
> That way we know that any page that is all-visible doesn't ever need to
> look at xmin/xmax since we are sure to have set all relevant hint
> bits.
Heikki noticed that I made quite the omission here which is that you
would need to mark tuples as all visible as well. I was thinking about
using HEAP_MOVED_OFF | HEAP_MOVED_IN as a hint for that.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2013-05-23 21:16:45 | Re: Move unused buffers to freelist |
Previous Message | Alvaro Herrera | 2013-05-23 18:56:30 | Re: WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1 |