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!