Toggle navigation
类型: integer
默认: 200
最低限度: 10
最大: 10000
单元: milliseconds (ms)
上下文: sighup
重新开始: false

指定后台写入器活动轮次之间的延迟。在每个轮次中,写入器都会为一定数量的脏缓冲区发出写操作(可以用下面的参数控制)。然后它就休眠 bgwriter_delay毫秒, 然后重复动作。默认值是 200 毫秒(200ms)。注意在许多系统上,休眠延迟的有效解析度是 10 毫秒;因此,为bgwriter_delay设置一个 不是 10 的倍数的值与把它设置为下一个更高的 10 的倍数是一样的效果。这个选项只能在服务器命令行上或者在postgresql.conf文件中设置。

建议 [EN]

Thanks to bgwriter autotuning, it should no longer be necessary for most users to touch the bgwriter settings. Only modify these if you have a demonstrated issue shown by checkpoint spikes and monitoring pg_stat_bgwriter. Laptop PostgreSQL users may want to increase bgwriter_delay to 60s to decrease I/O activity, since it is no longer possible to turn the bgwriter off.

条评论