diff options
| author | Tom Lane | 2007-09-25 20:03:38 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-09-25 20:03:38 +0000 |
| commit | 6f5c38dcd0dfb391bcbaa683a96f4a62c574d95a (patch) | |
| tree | 720d4cd3b589bdff97825ed56cc5e1de706bcd87 /src/include/pgstat.h | |
| parent | 588901df84588981aabf40df3287219405ec443b (diff) | |
Just-in-time background writing strategy. This code avoids re-scanning
buffers that cannot possibly need to be cleaned, and estimates how many
buffers it should try to clean based on moving averages of recent allocation
requests and density of reusable buffers. The patch also adds a couple
more columns to pg_stat_bgwriter to help measure the effectiveness of the
bgwriter.
Greg Smith, building on his own work and ideas from several other people,
in particular a much older patch from Itagaki Takahiro.
Diffstat (limited to 'src/include/pgstat.h')
| -rw-r--r-- | src/include/pgstat.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 2f53fdcd7c..2d3c698953 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.67 2007/09/24 03:12:23 tgl Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.68 2007/09/25 20:03:38 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -294,6 +294,8 @@ typedef struct PgStat_MsgBgWriter PgStat_Counter m_buf_written_checkpoints; PgStat_Counter m_buf_written_clean; PgStat_Counter m_maxwritten_clean; + PgStat_Counter m_buf_written_backend; + PgStat_Counter m_buf_alloc; } PgStat_MsgBgWriter; @@ -394,6 +396,8 @@ typedef struct PgStat_GlobalStats PgStat_Counter buf_written_checkpoints; PgStat_Counter buf_written_clean; PgStat_Counter maxwritten_clean; + PgStat_Counter buf_written_backend; + PgStat_Counter buf_alloc; } PgStat_GlobalStats; |
