pgsql: Introduce pg_stat_checkpointer

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Introduce pg_stat_checkpointer
Дата
Msg-id E1qxGRf-0031eB-Ko@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Introduce pg_stat_checkpointer

Historically, the statistics of the checkpointer have been always part
of pg_stat_bgwriter.  This commit removes a few columns from
pg_stat_bgwriter, and introduces pg_stat_checkpointer with equivalent,
renamed columns (plus a new one for the reset timestamp):
- checkpoints_timed -> num_timed
- checkpoints_req -> num_requested
- checkpoint_write_time -> write_time
- checkpoint_sync_time -> sync_time
- buffers_checkpoint -> buffers_written

The fields of PgStat_CheckpointerStats and its SQL functions are renamed
to match with the new field names, for consistency.  Note that
background writer and checkpointer have been split into two different
processes in commits 806a2aee3791 and bf405ba8e460.  The pgstat
structures were already split, making this change straight-forward.

Bump catalog version.

Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Andres Freund, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACVxX2ii=66RypXRweZe2EsBRiPMj0aHfRfHUeXJcC7kHg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/96f052613f35d07d001c8dd2f284ca8d95f82d1b

Modified Files
--------------
doc/src/sgml/monitoring.sgml                     | 98 ++++++++++++++++++------
src/backend/access/transam/xlog.c                |  4 +-
src/backend/catalog/system_views.sql             | 14 ++--
src/backend/postmaster/checkpointer.c            |  6 +-
src/backend/storage/buffer/bufmgr.c              |  2 +-
src/backend/utils/activity/pgstat_checkpointer.c | 21 ++---
src/backend/utils/adt/pgstatfuncs.c              | 35 +++++----
src/include/catalog/catversion.h                 |  2 +-
src/include/catalog/pg_proc.dat                  | 30 ++++----
src/include/pgstat.h                             | 11 +--
src/test/recovery/t/029_stats_restart.pl         |  6 +-
src/test/regress/expected/rules.out              | 13 ++--
src/test/regress/expected/stats.out              | 27 ++++++-
src/test/regress/sql/stats.sql                   | 13 +++-
14 files changed, 187 insertions(+), 95 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Refactor some code related to transaction-level statistics for r
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Mention standby.signal in FATALs for checkpoint record missing a