> I don't think the bgwriter is going to be able to keep up with I/O bound
> backends, but I do think it can scan and set those booleans fast enough
> for the backends to then perform the writes.
As long as the bgwriter does not do sync writes (which it does not,
since that would need a whole lot of work to be performant) it calls
write which returns more or less at once.
So the bottleneck can only be the fsync. From those you would want
at least one per pg disk open in parallel.
But I think it should really be left to the OS when it actually does the IO
for the writes from the bgwriter inbetween checkpoints.
So Imho the target should be to have not much IO open for the checkpoint,
so the fsync is fast enough, even if serial.
Andreas