Type: | integer |
Default: | 64 (512kB) |
Min: | 0 (0kB) |
Max: | 256 (2MB) |
Unit: | 8kB |
Context: | sighup |
Restart: | false |
Since: | 9.6 |
Whenever more than this amount of data has been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Doing so will limit the amount of dirty data in the kernel's page cache, reducing the likelihood of stalls when an fsync is issued at the end of a checkpoint, or when the OS writes data back in larger batches in the background. Often that will result in greatly reduced transaction latency, but there also are some cases, especially with workloads that are bigger than shared_buffers, but smaller than the OS's page cache, where performance might degrade. This setting may have no effect on some platforms. If this value is specified without units, it is taken as blocks, that is BLCKSZ
bytes, typically 8kB. The valid range is between 0
, which disables forced writeback, and 2MB
. The default is 512kB
on Linux, 0
elsewhere. (If BLCKSZ
is not 8kB, the default and maximum values scale proportionally to it.) This parameter can only be set in the postgresql.conf file or on the server command line.