mirror of
https://github.com/postgres/postgres.git
synced 2025-11-26 23:43:30 +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:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.90 2007/05/30 20:12:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.91 2007/06/28 00:02:40 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -35,6 +35,7 @@
|
||||
#define BM_IO_ERROR (1 << 4) /* previous I/O failed */
|
||||
#define BM_JUST_DIRTIED (1 << 5) /* dirtied since write started */
|
||||
#define BM_PIN_COUNT_WAITER (1 << 6) /* have waiter for sole pin */
|
||||
#define BM_CHECKPOINT_NEEDED (1 << 7) /* must write for checkpoint */
|
||||
|
||||
typedef bits16 BufFlags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user