Don't balance vacuum cost delay when per-table settings are in effect
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 3 Oct 2014 16:01:27 +0000 (13:01 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 3 Oct 2014 16:01:27 +0000 (13:01 -0300)
commit67ed9d53136dc98191c5945043a17a12e10b480b
treee90b722ece7c455825792857eb0bcea221195d7d
parentef8ac584e0a7062101dc244566bfe0ca7a13496d
Don't balance vacuum cost delay when per-table settings are in effect

When there are cost-delay-related storage options set for a table,
trying to make that table participate in the autovacuum cost-limit
balancing algorithm produces undesirable results: instead of using the
configured values, the global values are always used,
as illustrated by Mark Kirkwood in
http://www.postgresql.org/message-id/52FACF15.8020507@catalyst.net.nz

Since the mechanism is already complicated, just disable it for those
cases rather than trying to make it cope.  There are undesirable
side-effects from this too, namely that the total I/O impact on the
system will be higher whenever such tables are vacuumed.  However, this
is seen as less harmful than slowing down vacuum, because that would
cause bloat to accumulate.  Anyway, in the new system it is possible to
tweak options to get the precise behavior one wants, whereas with the
previous system one was simply hosed.

This has been broken forever, so backpatch to all supported branches.
This might affect systems where cost_limit and cost_delay have been set
for individual tables.
doc/src/sgml/maintenance.sgml
src/backend/postmaster/autovacuum.c