Re: Freeze avoidance of very large table. - Mailing list pgsql-hackers

From Sawada Masahiko
Subject Re: Freeze avoidance of very large table.
Date
Msg-id CAD21AoCeEeAVzRQ67K83tp+FNujAjunFWi5XER53joOLGw3LDg@mail.gmail.com
Whole thread Raw
In response to Re: Freeze avoidance of very large table.  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Freeze avoidance of very large table.
List pgsql-hackers
On Thu, Jul 9, 2015 at 4:31 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
> On Fri, Jul 3, 2015 at 1:25 AM, Sawada Masahiko <sawada.mshk@gmail.com>
> wrote:
>>
>> On Fri, Jul 3, 2015 at 1:23 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> > On 2 July 2015 at 16:30, Sawada Masahiko <sawada.mshk@gmail.com> wrote:
>> >
>> >>
>> >> Also, the flags of each heap page header might be set PD_ALL_FROZEN,
>> >> as well as all-visible
>> >
>> >
>> > Is it possible to have VM bits set to frozen but not visible?
>> >
>> > The description makes those two states sound independent of each other.
>> >
>> > Are they? Or not? Do we test for an impossible state?
>> >
>>
>> It's impossible to have VM bits set to frozen but not visible.
>> These bit are controlled independently. But eventually, when
>> all-frozen bit is set, all-visible is also set.
>
>
> If that combination is currently impossible, could it be used indicate that
> the page is all empty?

Yeah, the status of that VM bits set to frozen but not visible is
impossible, so we could use this status for another something status
of the page.

> Having a crash-proof bitmap of all-empty pages would make vacuum truncation
> scans much more efficient.

The empty page is always marked all-visible by vacuum today, it's not enough?

Regards,

--
Sawada Masahiko



pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: optimizing vacuum truncation scans
Next
From: Haribabu Kommi
Date:
Subject: Re: Waits monitoring