Re: Visibility map and freezing - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Visibility map and freezing
Date
Msg-id 87iqpina1s.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Visibility map and freezing  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:

> What's about add second bit which mark frozen page (all tuples have freeze
> XID)? It should avoid full scan, but extend size of map.

That would only really work if you have a very static table where entire pages
get frozen and stay frozen long before the freeze_max_age is reached. Even
that wouldn't really work because the partial vacuums would never see those
pages.

One option is to keep a frozenxid per page which would allow us to visit only
pages that need freezing.

A more complex scheme would be to have a bit which indicates that all
non-frozen xids are > relfrozenxid+100M. When we find all the bits set we can
clear them all and bump relfrozenxid by 100M. This would allow regular partial
vacuums to gradually move the frozenxid forward.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: notification payloads
Next
From: "Pavel Stehule"
Date:
Subject: Re: Summary: changes needed in function defaults behavior