|
PostgreSQL Source Code git master
|

Go to the source code of this file.
Macros | |
| #define | WALSTAT_ACC(fld, var_to_add) (stats_shmem->stats.wal_counters.fld += var_to_add.fld) |
Functions | |
| void | pgstat_report_wal (bool force) |
| PgStat_WalStats * | pgstat_fetch_stat_wal (void) |
| static bool | pgstat_wal_have_pending (void) |
| bool | pgstat_wal_flush_cb (bool nowait) |
| void | pgstat_wal_init_backend_cb (void) |
| void | pgstat_wal_init_shmem_cb (void *stats) |
| void | pgstat_wal_reset_all_cb (TimestampTz ts) |
| void | pgstat_wal_snapshot_cb (void) |
Variables | |
| static WalUsage | prevWalUsage |
| #define WALSTAT_ACC | ( | fld, | |
| var_to_add | |||
| ) | (stats_shmem->stats.wal_counters.fld += var_to_add.fld) |
| PgStat_WalStats * pgstat_fetch_stat_wal | ( | void | ) |
Definition at line 67 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().
| void pgstat_report_wal | ( | bool | force | ) |
Definition at line 46 of file pgstat_wal.c.
References PGSTAT_BACKEND_FLUSH_IO, PGSTAT_BACKEND_FLUSH_WAL, pgstat_flush_backend(), pgstat_flush_io(), and pgstat_wal_flush_cb().
Referenced by BackgroundWriterMain(), CheckpointerMain(), summarizer_wait_for_wal(), WalReceiverMain(), and WalWriterMain().
| bool pgstat_wal_flush_cb | ( | bool | nowait | ) |
Definition at line 91 of file pgstat_wal.c.
References Assert(), PgStat_ShmemControl::is_shutdown, IsPostmasterEnvironment, IsUnderPostmaster, PgStatShared_Wal::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), pgstat_wal_have_pending(), pgStatLocal, pgWalUsage, prevWalUsage, PgStat_LocalState::shmem, PgStat_ShmemControl::wal, WALSTAT_ACC, and WalUsageAccumDiff().
Referenced by pgstat_report_wal().
|
inlinestatic |
Definition at line 78 of file pgstat_wal.c.
References pgWalUsage, prevWalUsage, and WalUsage::wal_records.
Referenced by pgstat_wal_flush_cb().
| void pgstat_wal_init_backend_cb | ( | void | ) |
Definition at line 139 of file pgstat_wal.c.
References pgWalUsage, and prevWalUsage.
| void pgstat_wal_init_shmem_cb | ( | void * | stats | ) |
Definition at line 150 of file pgstat_wal.c.
References PgStatShared_Wal::lock, and LWLockInitialize().
| void pgstat_wal_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 158 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 169 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.
|
static |
Definition at line 30 of file pgstat_wal.c.
Referenced by pgstat_wal_flush_cb(), pgstat_wal_have_pending(), and pgstat_wal_init_backend_cb().