PostgreSQL Source Code git master
|
Go to the source code of this file.
Macros | |
#define | CHECKPOINTER_ACC(fld) stats_shmem->stats.fld += PendingCheckpointerStats.fld |
#define | CHECKPOINTER_COMP(fld) pgStatLocal.snapshot.checkpointer.fld -= reset.fld; |
Functions | |
void | pgstat_report_checkpointer (void) |
PgStat_CheckpointerStats * | pgstat_fetch_stat_checkpointer (void) |
void | pgstat_checkpointer_init_shmem_cb (void *stats) |
void | pgstat_checkpointer_reset_all_cb (TimestampTz ts) |
void | pgstat_checkpointer_snapshot_cb (void) |
Variables | |
PgStat_CheckpointerStats | PendingCheckpointerStats = {0} |
#define CHECKPOINTER_ACC | ( | fld | ) | stats_shmem->stats.fld += PendingCheckpointerStats.fld |
#define CHECKPOINTER_COMP | ( | fld | ) | pgStatLocal.snapshot.checkpointer.fld -= reset.fld; |
void pgstat_checkpointer_init_shmem_cb | ( | void * | stats | ) |
Definition at line 89 of file pgstat_checkpointer.c.
References PgStatShared_Checkpointer::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_checkpointer_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 97 of file pgstat_checkpointer.c.
References PgStatShared_Checkpointer::changecount, PgStat_ShmemControl::checkpointer, PgStatShared_Checkpointer::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, PgStatShared_Checkpointer::reset_offset, PgStat_LocalState::shmem, PgStat_CheckpointerStats::stat_reset_timestamp, and PgStatShared_Checkpointer::stats.
void pgstat_checkpointer_snapshot_cb | ( | void | ) |
Definition at line 112 of file pgstat_checkpointer.c.
References PgStatShared_Checkpointer::changecount, PgStat_ShmemControl::checkpointer, PgStat_Snapshot::checkpointer, CHECKPOINTER_COMP, PgStatShared_Checkpointer::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, reset(), PgStatShared_Checkpointer::reset_offset, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, and PgStatShared_Checkpointer::stats.
PgStat_CheckpointerStats * pgstat_fetch_stat_checkpointer | ( | void | ) |
Definition at line 81 of file pgstat_checkpointer.c.
References PgStat_Snapshot::checkpointer, PGSTAT_KIND_CHECKPOINTER, pgstat_snapshot_fixed(), pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by pg_stat_get_checkpointer_buffers_written(), pg_stat_get_checkpointer_num_performed(), pg_stat_get_checkpointer_num_requested(), pg_stat_get_checkpointer_num_timed(), pg_stat_get_checkpointer_restartpoints_performed(), pg_stat_get_checkpointer_restartpoints_requested(), pg_stat_get_checkpointer_restartpoints_timed(), pg_stat_get_checkpointer_slru_written(), pg_stat_get_checkpointer_stat_reset_time(), pg_stat_get_checkpointer_sync_time(), and pg_stat_get_checkpointer_write_time().
void pgstat_report_checkpointer | ( | void | ) |
Definition at line 31 of file pgstat_checkpointer.c.
References Assert, PgStatShared_Checkpointer::changecount, PgStat_ShmemControl::checkpointer, CHECKPOINTER_ACC, PgStat_ShmemControl::is_shutdown, MemSet, PendingCheckpointerStats, pg_memory_is_all_zeros(), pgstat_assert_is_up, pgstat_begin_changecount_write(), pgstat_end_changecount_write(), pgstat_flush_io(), pgStatLocal, and PgStat_LocalState::shmem.
Referenced by CheckpointerMain(), CheckpointWriteDelay(), and HandleCheckpointerInterrupts().
PgStat_CheckpointerStats PendingCheckpointerStats = {0} |
Definition at line 24 of file pgstat_checkpointer.c.
Referenced by BufferSync(), CheckpointerMain(), HandleCheckpointerInterrupts(), LogCheckpointEnd(), pgstat_report_checkpointer(), and SlruInternalWritePage().