Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 806a2ae

Browse filesBrowse files
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
1 parent 589adb8 commit 806a2ae
Copy full SHA for 806a2ae

File tree

11 files changed

+124
-987
lines changed
Filter options

11 files changed

+124
-987
lines changed

‎src/backend/bootstrap/bootstrap.c

Copy file name to clipboardExpand all lines: src/backend/bootstrap/bootstrap.c
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ AuxiliaryProcessMain(int argc, char *argv[])
315315
case BgWriterProcess:
316316
statmsg = "writer process";
317317
break;
318+
case CheckpointerProcess:
319+
statmsg = "checkpointer process";
320+
break;
318321
case WalWriterProcess:
319322
statmsg = "wal writer process";
320323
break;
@@ -415,6 +418,11 @@ AuxiliaryProcessMain(int argc, char *argv[])
415418
BackgroundWriterMain();
416419
proc_exit(1); /* should never return */
417420

421+
case CheckpointerProcess:
422+
/* don't set signals, checkpointer has its own agenda */
423+
CheckpointerMain();
424+
proc_exit(1); /* should never return */
425+
418426
case WalWriterProcess:
419427
/* don't set signals, walwriter has its own agenda */
420428
InitXLOGAccess();

‎src/backend/postmaster/Makefile

Copy file name to clipboardExpand all lines: src/backend/postmaster/Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ top_builddir = ../../..
1313
include $(top_builddir)/src/Makefile.global
1414

1515
OBJS = autovacuum.o bgwriter.o fork_process.o pgarch.o pgstat.o postmaster.o \
16-
syslogger.o walwriter.o
16+
syslogger.o walwriter.o checkpointer.o
1717

1818
include $(top_srcdir)/src/backend/common.mk

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.