Re: Freezing without cleanup lock - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Freezing without cleanup lock
Date
Msg-id CAD21AoC16QVUBEXJWyaHA4x6-jW0LXAWSLQdWh6V21kYi4eErw@mail.gmail.com
Whole thread Raw
In response to Re: Freezing without cleanup lock  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On Mon, Oct 26, 2015 at 4:39 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 10/22/15 6:39 PM, Alvaro Herrera wrote:
>>
>> Jim Nasby wrote:
>>
>>> That would be the minimal-impact version, yes. But I suspect if we went
>>> through the trouble to do that, it would be just as easy to attempt the
>>> freeze regardless of what scan_all is set to.
>>
>>
>> You mean if !scan_all we conditional-get the cleanup lock, if we get it
>> then prune, if not then freeze?  That seems nice on paper but I think
>> it's useless because unless scan_all is true, then relfrozenxid doesn't
>> advance anyway.
>
>
> Actually, advancing relfrozenxid only depends on having hit all pages in the
> table, which can happen even if !scan_all. Aside from that, once the freeze
> map hits this would be useful in setting bits there.

Yeah, when the all pages have frozen totally (that is, when
scanned_page + vm_skipped_frozen_page equals relpages), relfrozenxid
will be updated. But the item pointers of page that are frozen by such
logic are never pruned.

Regards,

--
Masahiko Sawada



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch (3): Implement failover on libpq connect level.
Next
From: Tom Lane
Date:
Subject: Re: Proposal: Trigonometric functions in degrees