PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
void | pgstat_report_archiver (const char *xlog, bool failed) |
PgStat_ArchiverStats * | pgstat_fetch_stat_archiver (void) |
void | pgstat_archiver_init_shmem_cb (void *stats) |
void | pgstat_archiver_reset_all_cb (TimestampTz ts) |
void | pgstat_archiver_snapshot_cb (void) |
void pgstat_archiver_init_shmem_cb | ( | void * | stats | ) |
Definition at line 66 of file pgstat_archiver.c.
References PgStatShared_Archiver::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_archiver_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 74 of file pgstat_archiver.c.
References PgStat_ShmemControl::archiver, PgStatShared_Archiver::changecount, PgStatShared_Archiver::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, PgStatShared_Archiver::reset_offset, PgStat_LocalState::shmem, PgStat_ArchiverStats::stat_reset_timestamp, and PgStatShared_Archiver::stats.
void pgstat_archiver_snapshot_cb | ( | void | ) |
Definition at line 89 of file pgstat_archiver.c.
References PgStat_ArchiverStats::archived_count, PgStat_ShmemControl::archiver, PgStat_Snapshot::archiver, PgStatShared_Archiver::changecount, PgStat_ArchiverStats::failed_count, PgStat_ArchiverStats::last_archived_timestamp, PgStat_ArchiverStats::last_archived_wal, PgStat_ArchiverStats::last_failed_timestamp, PgStat_ArchiverStats::last_failed_wal, PgStatShared_Archiver::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgStatLocal, reset(), PgStatShared_Archiver::reset_offset, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, and PgStatShared_Archiver::stats.
PgStat_ArchiverStats* pgstat_fetch_stat_archiver | ( | void | ) |
Definition at line 58 of file pgstat_archiver.c.
References PgStat_Snapshot::archiver, PGSTAT_KIND_ARCHIVER, pgstat_snapshot_fixed(), pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by pg_stat_get_archiver().
void pgstat_report_archiver | ( | const char * | xlog, |
bool | failed | ||
) |
Definition at line 28 of file pgstat_archiver.c.
References PgStat_ArchiverStats::archived_count, PgStat_ShmemControl::archiver, PgStatShared_Archiver::changecount, PgStat_ArchiverStats::failed_count, GetCurrentTimestamp(), PgStat_ArchiverStats::last_archived_timestamp, PgStat_ArchiverStats::last_archived_wal, PgStat_ArchiverStats::last_failed_timestamp, PgStat_ArchiverStats::last_failed_wal, now(), pgstat_begin_changecount_write(), pgstat_end_changecount_write(), pgStatLocal, PgStat_LocalState::shmem, and PgStatShared_Archiver::stats.
Referenced by pgarch_ArchiverCopyLoop().