From: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: getting rid of freezing |
Date: | 2013-05-25 06:23:15 |
Message-ID: | 51A058D3.8070001@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/24/2013 07:00 PM, Robert Haas wrote:
> On Fri, May 24, 2013 at 11:29 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Fri, May 24, 2013 at 10:53 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>>>> [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.
>> Yeah. I too feel like there might be a solution. But I don't know
>> have something specific in mind, yet anyway.
> One thought I had is that it might be beneficial to freeze when a page
> ceases to be all-visible, rather than when it becomes all-visible.
That what I aimed to describe in my mail earlier, but your
description is much clearer :)
> Any operation that makes the page not-all-visible is going to emit an
> FPI anyway, so we don't have to worry about torn pages in that case.
> Under such a scheme, we'd have to enforce the rule that xmin and xmax
> are ignored for any page that is all-visible;
Agreed. We already relay on all-visible pages enough that we
can trust it to be correct. Making that universal rule should not
add any risks .
The rule "page all-visible ==> assume all tuples frozen" would
also enable VACUUM FREEZE to only work only on the
non-all-visible pages .
> and when a page ceases
> to be all-visible, we have to go back and really freeze the
> pre-existing tuples.
We can do this unconditionally, or in milder case use vacuum_freeze_min_age
if we want to retain xids for forensic purposes.
> I think we might be able to use the existing
> all_visible_cleared/new_all_visible_cleared flags to trigger this
> behavior, without adding anything new to WAL at all.
This seems to be easiest
--
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ
From | Date | Subject | |
---|---|---|---|
Next Message | Amit kapila | 2013-05-25 06:32:50 | Re: Move unused buffers to freelist |
Previous Message | Heikki Linnakangas | 2013-05-25 03:07:37 | Re: Incomplete description of pg_start_backup? |