From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: getting rid of freezing |
Date: | 2013-05-24 14:53:18 |
Message-ID: | 20130524145318.GE29374@alap2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-05-23 22:09:02 -0400, Robert Haas wrote:
> On Thu, May 23, 2013 at 1:51 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > So, what I propose instead is basically:
> > 1) only vacuum non-all-visible pages, even when doing it for
> > anti-wraparound
>
> Check. We might want an option to force a scan of the whole relation.
Yea, thought of that as well. VACUUM (DEEP) ;).
> > 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.
> I think you mean "in the latter case" not "in the former case". If
> not, then I'm confused.
Uh. Yes.
> > We don't even necessarily need to log the hint bits for all items since
> > the redo for all_visible could make sure all items are hinted. The only
> > problem is knowing up to where we can truncate pg_clog...
> [all-visible cannot restore hint bits without FPI because of torn pages]
I haven't yet thought about this sufficiently yet. I think we might have
a chance of working around this, let me ponder a bit.
But even if that means needing a full page write via the usual mechanism
for all visible if any hint bits needed to be set we are still out far
ahead of the current state imo.
* cleanup would quite possibly do an FPI shortly after in vacuum
anyway. If we do it for all visible, it possibly does not need to be
done for it.
* freezing would FPI almost guaranteedly since we do it so much
later.
* Not having to rescan the whole heap will be a bigger cost saving...
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2013-05-24 14:57:22 | Re: pg_rewind, a tool for resynchronizing an old master after failover |
Previous Message | Jim Nasby | 2013-05-24 14:52:54 | Re: Move unused buffers to freelist |