1
0
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:
Simon Riggs
2011-11-01 17:14:47 +00:00
parent 589adb86ee
commit 806a2aee37
11 changed files with 124 additions and 987 deletions

View File

@ -1278,11 +1278,9 @@ BufferSync(int flags)
break;
/*
* Perform normal bgwriter duties and sleep to throttle our
* I/O rate.
* Sleep to throttle our I/O rate.
*/
CheckpointWriteDelay(flags,
(double) num_written / num_to_write);
CheckpointWriteDelay(flags, (double) num_written / num_to_write);
}
}