类型: real
默认: 0 (0ms)
最低限度: 0 (0ms)
最大: 100 (100ms)
单元: milliseconds (ms)
上下文: user
重新开始: false

当超出开销限制时进程将要休眠的时间量。如果指定值时没有单位,则以毫秒为单位。 其默认值为0,这将禁用基于代价的清理延迟特性。正值将启用基于代价的清理。

在使用基于代价的清理时,vacuum_cost_delay的合适值通常很小,也许是小于1毫秒。 虽然vacuum_cost_delay可以被设置为毫秒级别的值,但是在较老的平台上可能无法准确地测量这种延迟。 在这样的平台上,增加 VACUUM的节流资源消耗在1ms以上,需要改变其他的清理开销参数。 尽管如此,你应该保持 vacuum_cost_delay 在平台能持续测量的情况下尽可能小;大延迟没有帮助。

建议 [EN]

Most of the time, you will want manual vacuum to execute without vacuum_delay, especially if you're using it as part of ETL. If for some reason you can't use autovacuum on an OLTP database, however, you may want to increase this to 20ms to decrease the impact vacuum has on currently running queries. Will cause vacuum to take up to twice as long to complete.

条评论