I haven't read your patch, but I wonder if we should decrease the
default value of multixact_freeze_table_age (currently 150 million).
The freeze_min_age is 5 million; if freeze_table_age were a lot lower,
the problem would be less pronounced.
Additionally, I will backpatch commit 27846f02c176. The average size of
multixacts decreases with that fix in many common cases, which greatly
reduces the need for any of this in the first place.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services