PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | WALSTAT_ACC(fld) stats_shmem->stats.fld += PendingWalStats.fld |
Functions | |
void | pgstat_report_wal (bool force) |
PgStat_WalStats * | pgstat_fetch_stat_wal (void) |
bool | pgstat_flush_wal (bool nowait) |
void | pgstat_init_wal (void) |
bool | pgstat_have_pending_wal (void) |
void | pgstat_wal_reset_all_cb (TimestampTz ts) |
void | pgstat_wal_snapshot_cb (void) |
Variables | |
PgStat_WalStats | PendingWalStats = {0} |
static WalUsage | prevWalUsage |
#define WALSTAT_ACC | ( | fld | ) | stats_shmem->stats.fld += PendingWalStats.fld |
PgStat_WalStats* pgstat_fetch_stat_wal | ( | void | ) |
Definition at line 53 of file pgstat_wal.c.
References PGSTAT_KIND_WAL, pgstat_snapshot_fixed(), pgStatLocal, PgStat_LocalState::snapshot, and PgStat_Snapshot::wal.
Referenced by pg_stat_get_wal().
Definition at line 68 of file pgstat_wal.c.
References Assert(), PgStat_ShmemControl::is_shutdown, IsPostmasterEnvironment, IsUnderPostmaster, PgStatShared_Wal::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MemSet, PendingWalStats, pgstat_have_pending_wal(), pgStatLocal, pgWalUsage, prevWalUsage, PgStat_LocalState::shmem, PgStat_ShmemControl::wal, WalUsage::wal_bytes, PgStat_WalStats::wal_bytes, WalUsage::wal_fpi, PgStat_WalStats::wal_fpi, WalUsage::wal_records, PgStat_WalStats::wal_records, WALSTAT_ACC, and WalUsageAccumDiff().
Referenced by pgstat_report_stat(), and pgstat_report_wal().
bool pgstat_have_pending_wal | ( | void | ) |
Definition at line 144 of file pgstat_wal.c.
References PendingWalStats, pgWalUsage, prevWalUsage, WalUsage::wal_records, PgStat_WalStats::wal_sync, and PgStat_WalStats::wal_write.
Referenced by pgstat_flush_wal(), and pgstat_report_stat().
void pgstat_init_wal | ( | void | ) |
Definition at line 126 of file pgstat_wal.c.
References pgWalUsage, and prevWalUsage.
Referenced by pgstat_initialize().
void pgstat_report_wal | ( | bool | force | ) |
Definition at line 43 of file pgstat_wal.c.
References pgstat_flush_wal().
Referenced by CheckpointerMain(), HandleCheckpointerInterrupts(), and WalWriterMain().
void pgstat_wal_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 152 of file pgstat_wal.c.
References PgStatShared_Wal::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_WalStats::stat_reset_timestamp, PgStatShared_Wal::stats, and PgStat_ShmemControl::wal.
void pgstat_wal_snapshot_cb | ( | void | ) |
Definition at line 163 of file pgstat_wal.c.
References PgStatShared_Wal::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, PgStatShared_Wal::stats, PgStat_ShmemControl::wal, and PgStat_Snapshot::wal.
PgStat_WalStats PendingWalStats = {0} |
Definition at line 24 of file pgstat_wal.c.
Referenced by AdvanceXLInsertBuffer(), issue_xlog_fsync(), pgstat_flush_wal(), pgstat_have_pending_wal(), and XLogWrite().
|
static |
Definition at line 32 of file pgstat_wal.c.
Referenced by pgstat_flush_wal(), pgstat_have_pending_wal(), and pgstat_init_wal().