PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | BGWRITER_ACC(fld) stats_shmem->stats.fld += PendingBgWriterStats.fld |
#define | BGWRITER_COMP(fld) pgStatLocal.snapshot.bgwriter.fld -= reset.fld; |
Functions | |
void | pgstat_report_bgwriter (void) |
PgStat_BgWriterStats * | pgstat_fetch_stat_bgwriter (void) |
void | pgstat_bgwriter_init_shmem_cb (void *stats) |
void | pgstat_bgwriter_reset_all_cb (TimestampTz ts) |
void | pgstat_bgwriter_snapshot_cb (void) |
Variables | |
PgStat_BgWriterStats | PendingBgWriterStats = {0} |
#define BGWRITER_ACC | ( | fld | ) | stats_shmem->stats.fld += PendingBgWriterStats.fld |
#define BGWRITER_COMP | ( | fld | ) | pgStatLocal.snapshot.bgwriter.fld -= reset.fld; |
void pgstat_bgwriter_init_shmem_cb | ( | void * | stats | ) |
Definition at line 80 of file pgstat_bgwriter.c.
References PgStatShared_BgWriter::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_bgwriter_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 88 of file pgstat_bgwriter.c.
References PgStat_ShmemControl::bgwriter, PgStatShared_BgWriter::changecount, PgStatShared_BgWriter::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, PgStatShared_BgWriter::reset_offset, PgStat_LocalState::shmem, PgStat_BgWriterStats::stat_reset_timestamp, and PgStatShared_BgWriter::stats.
void pgstat_bgwriter_snapshot_cb | ( | void | ) |
Definition at line 103 of file pgstat_bgwriter.c.
References PgStat_ShmemControl::bgwriter, PgStat_Snapshot::bgwriter, BGWRITER_COMP, PgStatShared_BgWriter::changecount, PgStatShared_BgWriter::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, reset(), PgStatShared_BgWriter::reset_offset, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, and PgStatShared_BgWriter::stats.
PgStat_BgWriterStats* pgstat_fetch_stat_bgwriter | ( | void | ) |
Definition at line 72 of file pgstat_bgwriter.c.
References PgStat_Snapshot::bgwriter, PGSTAT_KIND_BGWRITER, pgstat_snapshot_fixed(), pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by pg_stat_get_bgwriter_buf_written_clean(), pg_stat_get_bgwriter_maxwritten_clean(), pg_stat_get_bgwriter_stat_reset_time(), and pg_stat_get_buf_alloc().
void pgstat_report_bgwriter | ( | void | ) |
Definition at line 31 of file pgstat_bgwriter.c.
References Assert, PgStat_ShmemControl::bgwriter, BGWRITER_ACC, PgStatShared_BgWriter::changecount, PgStat_ShmemControl::is_shutdown, MemSet, PendingBgWriterStats, 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 BackgroundWriterMain().
PgStat_BgWriterStats PendingBgWriterStats = {0} |
Definition at line 24 of file pgstat_bgwriter.c.
Referenced by BgBufferSync(), and pgstat_report_bgwriter().