Zdenek Kotala wrote:
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.

First of all, we'd still have to make the decision of when to scan pages that need freezing, and when to only scan pages that have dead tuples.

Secondly, if it's just one bit, we'd have to freeze all tuples on the page to set the bit, which is a lot more aggressive than we do now.

Thirdly, those frozen bits would be critical, not just hints like the visibility map is right now. Corrupt frozen bits would lead to data loss. That means we'd have to solve the problem of how to make sure the bits are always cleared when tuples are updated on a page. That's not completely crash-proof at the moment, see comments in visibilitymap.c. Even if we did solve that, I'd rather live with a hints-only visibility map for one release, before we take the plunge and make it a critical part. Just in case...

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to