What are the real differences between the bgwriter and checkpointer process? Both of them write data from the buffer to the data files, right? Is it just a matter of 'when' they write?
I believe, "Checkpoint" is one of the responsible duty of bgwriter process. AFAIK from PG 9.2 onwards, we have another independent process called "CKPTR process" which independently works. "Bgwriter" simply move the shared_buffer's pages into local disk on the basis of LRU method. Where as "CKPTR process" moves all the dirty buffers into local disk, and make a transaction log sequence, at which all the data files have been updated to reflect this information.