There is a separate server process called the background writer, whose function is to issue writes of “dirty” (new or modified) shared buffers. When the number of clean shared buffers appears to be insufficient, the background writer writes some dirty buffers to the file system and marks them as clean. This reduces the likelihood that server processes handling user queries will be unable to find clean buffers and have to write dirty buffers themselves. However, the background writer does cause a net overall increase in I/O load, because while a repeatedly-dirtied page might otherwise be written only once per checkpoint interval, the background writer might write it several times as it is dirtied in the same interval. The parameters discussed in this subsection can be used to tune the behavior for local needs.
I believe the postmaster checks if it is running, if not it starts again i think.
in source.
The same goes for wal writer as well.
On Fri, 4 Jun 2021 at 14:55, Raj kumar <rajkumar820999@xxxxxxxxx> wrote:
Hi Team,I've killed background writer process for a testing purpose. I found that after sometime it automatically came up with a new PID without me doing anything from my end.How postgres automatically brings it up? Is there any impact on the Database and connections?Thanks,Raj Kumar Narendiran
Thanks,
Vijay
Mumbai, India