Wiki / Configuration Parameters
bgwriter_delay
Specifies the delay between activity rounds for the background writer. In each round the writer issues writes for some number of dirty buffers (controllable by the following parameters). It then sleeps for the length of bgwriter_delay, and repeats. When there are no dirty buffers in the buffer pool, though, it goes into a longer sleep regardless of bgwriter_delay. If this value is specified without units, it is taken as milliseconds. The default value is 200 milliseconds (200ms). Note that on some systems, the effective resolution of sleep delays is 10 milliseconds; setting bgwriter_delay to a value that is not a multiple of 10 might have the same results as setting it to the next higher multiple of 10. This parameter can only be set in the postgresql.conf file or on the server command line.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- 200
- category
- Resource Usage / Background Writer
- context
- sighup
- documented
- true
- enumvals
- Unknown
- extra desc
- Unknown
- lang
- en
- max val
- 10000
- metadata version
- 18
- min val
- 10
- name
- bgwriter_delay
- short desc
- Background writer sleep time between rounds.
- source
- pg-settings-source-snapshot
- unit
- ms
- vartype
- integer
Definition PG 18
Specifies the delay between activity rounds for the background writer. In each round the writer issues writes for some number of dirty buffers (controllable by the following parameters). It then sleeps for the length of bgwriter_delay, and repeats. When there are no dirty buffers in the buffer pool, though, it goes into a longer sleep regardless of bgwriter_delay. If this value is specified without units, it is taken as milliseconds. The default value is 200 milliseconds (200ms). Note that on some systems, the effective resolution of sleep delays is 10 milliseconds; setting bgwriter_delay to a value that is not a multiple of 10 might have the same results as setting it to the next higher multiple of 10. This parameter can only be set in the postgresql.conf file or on the server command line.
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:ac7e60f89b393da0beea4fb24dea2838c3353613dece411e21d3c5b1be6555d6
Text language: en · wiki-repair-20261023:ac7e60f89b393da0beea4fb24dea2838c3353613dece411e21d3c5b1be6555d6