mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Implement "distributed" checkpoints in which the checkpoint I/O is spread
over a fairly long period of time, rather than being spat out in a burst. This happens only for background checkpoints carried out by the bgwriter; other cases, such as a shutdown checkpoint, are still done at full speed. Remove the "all buffers" scan in the bgwriter, and associated stats infrastructure, since this seems no longer very useful when the checkpoint itself is properly throttled. Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas, and some minor API editorialization by me.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.402 2007/06/21 22:59:12 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.403 2007/06/28 00:02:39 tgl Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -1573,15 +1573,6 @@ static struct config_int ConfigureNamesInt[] =
|
||||
5, 0, 1000, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"bgwriter_all_maxpages", PGC_SIGHUP, RESOURCES,
|
||||
gettext_noop("Background writer maximum number of all pages to flush per round."),
|
||||
NULL
|
||||
},
|
||||
&bgwriter_all_maxpages,
|
||||
5, 0, 1000, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"log_rotation_age", PGC_SIGHUP, LOGGING_WHERE,
|
||||
gettext_noop("Automatic log file rotation will occur after N minutes."),
|
||||
@ -1834,15 +1825,6 @@ static struct config_real ConfigureNamesReal[] =
|
||||
1.0, 0.0, 100.0, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"bgwriter_all_percent", PGC_SIGHUP, RESOURCES,
|
||||
gettext_noop("Background writer percentage of all buffers to flush per round."),
|
||||
NULL
|
||||
},
|
||||
&bgwriter_all_percent,
|
||||
0.333, 0.0, 100.0, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"seed", PGC_USERSET, UNGROUPED,
|
||||
gettext_noop("Sets the seed for random-number generation."),
|
||||
@ -1870,6 +1852,15 @@ static struct config_real ConfigureNamesReal[] =
|
||||
0.1, 0.0, 100.0, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"checkpoint_completion_target", PGC_SIGHUP, WAL_CHECKPOINTS,
|
||||
gettext_noop("Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval."),
|
||||
NULL
|
||||
},
|
||||
&CheckPointCompletionTarget,
|
||||
0.5, 0.0, 1.0, NULL, NULL
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0, 0, NULL, NULL}, NULL, 0.0, 0.0, 0.0, NULL, NULL
|
||||
|
Reference in New Issue
Block a user