Re: autovacuum not prioritising for-wraparound tables
От | Alvaro Herrera |
---|---|
Тема | Re: autovacuum not prioritising for-wraparound tables |
Дата | |
Msg-id | 20130131193647.GB4883@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: autovacuum not prioritising for-wraparound tables (Christopher Browne <cbbrowne@gmail.com>) |
Ответы |
Re: autovacuum not prioritising for-wraparound tables
Re: autovacuum not prioritising for-wraparound tables Re: autovacuum not prioritising for-wraparound tables |
Список | pgsql-hackers |
Christopher Browne escribió: > On Fri, Jan 25, 2013 at 12:00 PM, Andres Freund <andres@2ndquadrant.com> wrote: > I'd be inclined to do something a bit more sophisticated than just > age(relfrozenxid) for wraparound; I'd be inclined to kick off large tables' > wraparound vacuums earlier than those for smaller tables. > > With a little bit of noodling around, here's a thought for a joint function > that I *think* has reasonably common scales: > > f(deadtuples, relpages, age) = > deadtuples/relpages + e ^ (age*ln(relpages)/2^32) Okay, here's a patch along these lines. I haven't considered Jim's suggestion downthread about discounting dead tuples from relpages; maybe we can do that by subtracting the pages attributed to dead ones, estimating via tuple density (reltuples/relpages). But that's no my main concern here. Instead, what I propose (and is not really in the patch), as a backpatchable item, is an approach in which the functions to compute each rel's Browne strength and sort are hooks. Normal behavior is not to sort at all, as currently, and sites that have a problem with the current random order can install a custom module that provide hooks to change ordering as they see fit. So behavior won't change for people who have no problem today. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: