mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +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:
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.62 2007/06/09 18:49:55 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.63 2007/06/28 00:02:40 tgl Exp $
|
||||
* ----------
|
||||
*/
|
||||
#ifndef PGSTAT_H
|
||||
@ -291,10 +291,8 @@ typedef struct PgStat_MsgBgWriter
|
||||
PgStat_Counter m_timed_checkpoints;
|
||||
PgStat_Counter m_requested_checkpoints;
|
||||
PgStat_Counter m_buf_written_checkpoints;
|
||||
PgStat_Counter m_buf_written_lru;
|
||||
PgStat_Counter m_buf_written_all;
|
||||
PgStat_Counter m_maxwritten_lru;
|
||||
PgStat_Counter m_maxwritten_all;
|
||||
PgStat_Counter m_buf_written_clean;
|
||||
PgStat_Counter m_maxwritten_clean;
|
||||
} PgStat_MsgBgWriter;
|
||||
|
||||
|
||||
@ -392,10 +390,8 @@ typedef struct PgStat_GlobalStats
|
||||
PgStat_Counter timed_checkpoints;
|
||||
PgStat_Counter requested_checkpoints;
|
||||
PgStat_Counter buf_written_checkpoints;
|
||||
PgStat_Counter buf_written_lru;
|
||||
PgStat_Counter buf_written_all;
|
||||
PgStat_Counter maxwritten_lru;
|
||||
PgStat_Counter maxwritten_all;
|
||||
PgStat_Counter buf_written_clean;
|
||||
PgStat_Counter maxwritten_clean;
|
||||
} PgStat_GlobalStats;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user