On Sat, Feb 2, 2013 at 1:49 PM, Andres Freund <and...@2ndquadrant.com> wrote: > You're right, this doesn't work superbly well, especially for > insert-only tables... But imo the place to fix it is not the > priorization logic but relation_needs_vacanalyze, since fixing it in > priorization won't prevent the BAM just the timing of it.
Agreed. > I think scheduling a table for a partial vacuum every min_freeze * 2 > xids, even if its insert only, would go a long way of reducing the > impact of full-table vacuums. Obviously that would require to retain the > last xid a vacuum was executed in... I'm not sure that min_freeze * 2 is the right value, but otherwise agreed. I keep coming back to the idea that vacuum should have a high-priority queue and a low-priority queue. When stuff meets the current thresholds, it goes into the high-priority queue. But then there should be a low-priority queue where we do partial vacuums of things that meet some lower threshold - like the unfrozen portions of insert-only tables. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers