mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Split work of bgwriter between 2 processes: bgwriter and checkpointer.
bgwriter is now a much less important process, responsible for page cleaning duties only. checkpointer is now responsible for checkpoints and so has a key role in shutdown. Later patches will correct doc references to the now old idea that bgwriter performs checkpoints. Has beneficial effect on performance at high write rates, but mainly refactoring to more easily allow changes for power reduction by simplifying previously tortuous code around required to allow page cleaning and checkpointing to time slice in the same process. Patch by me, Review by Dickson Guedes
This commit is contained in:
@ -315,6 +315,9 @@ AuxiliaryProcessMain(int argc, char *argv[])
|
||||
case BgWriterProcess:
|
||||
statmsg = "writer process";
|
||||
break;
|
||||
case CheckpointerProcess:
|
||||
statmsg = "checkpointer process";
|
||||
break;
|
||||
case WalWriterProcess:
|
||||
statmsg = "wal writer process";
|
||||
break;
|
||||
@ -415,6 +418,11 @@ AuxiliaryProcessMain(int argc, char *argv[])
|
||||
BackgroundWriterMain();
|
||||
proc_exit(1); /* should never return */
|
||||
|
||||
case CheckpointerProcess:
|
||||
/* don't set signals, checkpointer has its own agenda */
|
||||
CheckpointerMain();
|
||||
proc_exit(1); /* should never return */
|
||||
|
||||
case WalWriterProcess:
|
||||
/* don't set signals, walwriter has its own agenda */
|
||||
InitXLOGAccess();
|
||||
|
Reference in New Issue
Block a user