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

指定 WAL 写入器刷写 WAL 的频繁程度,以时间为单位。 在刷写WAL之后,写入器将根据wal_writer_delay所给出的时间长度进行睡眠,除非被一个异步提交的事务提前唤醒。 如果最近的刷写发生在 wal_writer_delay 之前,并且小于 wal_writer_flush_after WAL的值产生之后,那么WAL只会被写入操作系统,而不会被刷写到磁盘。 如果指定值时没有单位,则以毫秒作为单位。 默认值是 200 毫秒(200ms)。注意在很多系统上,有效的睡眠延迟粒度是 10 毫秒,把wal_writer_delay设置为一个不是 10 的倍数的值,其效果和把它设置为大于该值的下一个 10 的倍数产生的效果相同。这个参数只能在postgresql.conf文件中或者服务器命令行上设置。

建议 [EN]

Defines the maximum data (in time) that can be lost if synchronous_commit=off and the database shuts down. Because of long transactions, actual data lost can be up to twice this time. Has no effect if synchronous_commit=on. If you are going to turn synchronous_commit=off server-wide, you should probably lower this to prevent too much data loss.

条评论