Brandon Aiken wrote:
You're saying that the dirtyness of a table is proportional to when you plan on vacuuming it next.
The dirtiness of a table should most certainly have an effect on when it gets vacuumed in relation to other tables. If dirtiness could be rated, then the list of vacuumable tables could be sorted, vacuuming really dirty tables before less dirty ones.
Now, if I could get my hands on that rating for any given table, then I could write a night time script that would vacuum the dirtiest tables, in order, until either I run out of dirty tables, or I run out of time.
In fact, if autovacuum did just that, then I might be inclined to attack the problem with the "update postgresql.conf, pgctl" approach. At least then I'd know that even though ALL the dirty tables might not get cleaned every night, at least the worst ones would.
-Glen