summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2011-11-01 17:14:47 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2011-11-01 17:14:47 +0000
commit806a2aee3791244bf0f916729bfdb5489936e068 (patch)
tree1eb84ca670e07bdf49dfddbc1e1472ce934ba03d /src/backend/bootstrap/bootstrap.c
parent589adb86ee826190d2b6e744d117eee1fa6bbf75 (diff)
downloadpostgresql-806a2aee3791244bf0f916729bfdb5489936e068.tar.gz
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
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 4fe08df350..f9b839c3da 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -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();