pgsql: Add new buffers_backend_fsync field to pg_stat_bgwriter.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add new buffers_backend_fsync field to pg_stat_bgwriter.
Date: 2010-11-15 17:47:19
Message-ID: E1PI39D-00068k-3G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add new buffers_backend_fsync field to pg_stat_bgwriter.

This new field counts the number of times that a backend which writes a
buffer out to the OS must also fsync() it. This happens when the
bgwriter fsync request queue is full, and is generally detrimental to
performance, so it's good to know when it's happening. Along the way,
log a new message at level DEBUG1 whenever we fail to hand off an fsync,
so that the problem can also be seen in examination of log files
(if the logging level is cranked up high enough).

Greg Smith, with minor tweaks by me.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=3134d8863e8473e3ed791e27d484f9e548220411

Modified Files
--------------
doc/src/sgml/monitoring.sgml | 6 ++++--
src/backend/catalog/system_views.sql | 1 +
src/backend/postmaster/bgwriter.c | 16 ++++++++++++----
src/backend/postmaster/pgstat.c | 1 +
src/backend/storage/smgr/md.c | 3 +++
src/backend/utils/adt/pgstatfuncs.c | 7 +++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 ++
src/include/pgstat.h | 2 ++
src/test/regress/expected/rules.out | 2 +-
10 files changed, 34 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message User Andrewd 2010-11-15 17:51:29 pgbuildfarm - client-code: Call run_build.pl directly.
Previous Message Robert Haas 2010-11-15 16:01:18 pgsql: Remove outdated comments from the regression test files.