PostgreSQL Source Code git master
|
#include "common/hashfn_unstable.h"
#include "lib/dshash.h"
#include "lib/ilist.h"
#include "pgstat.h"
#include "storage/lwlock.h"
#include "utils/dsa.h"
Go to the source code of this file.
Data Structures | |
struct | PgStat_HashKey |
struct | PgStatShared_HashEntry |
struct | PgStatShared_Common |
struct | PgStat_EntryRef |
struct | PgStat_SubXactStatus |
struct | PgStat_KindInfo |
struct | PgStatShared_Archiver |
struct | PgStatShared_BgWriter |
struct | PgStatShared_Checkpointer |
struct | PgStatShared_IO |
struct | PgStatShared_SLRU |
struct | PgStatShared_Wal |
struct | PgStatShared_Database |
struct | PgStatShared_Relation |
struct | PgStatShared_Function |
struct | PgStatShared_Subscription |
struct | PgStatShared_ReplSlot |
struct | PgStatShared_Backend |
struct | PgStat_ShmemControl |
struct | PgStat_Snapshot |
struct | PgStat_LocalState |
Macros | |
#define | SLRU_NUM_ELEMENTS lengthof(slru_names) |
#define | pgstat_assert_is_up() ((void)true) |
#define | PGSTAT_BACKEND_FLUSH_IO (1 << 0) /* Flush I/O statistics */ |
#define | PGSTAT_BACKEND_FLUSH_WAL (1 << 1) /* Flush WAL statistics */ |
#define | PGSTAT_BACKEND_FLUSH_ALL (PGSTAT_BACKEND_FLUSH_IO | PGSTAT_BACKEND_FLUSH_WAL) |
Variables | |
static const char *const | slru_names [] |
PGDLLIMPORT PgStat_LocalState | pgStatLocal |
#define pgstat_assert_is_up | ( | ) | ((void)true) |
Definition at line 597 of file pgstat_internal.h.
#define PGSTAT_BACKEND_FLUSH_ALL (PGSTAT_BACKEND_FLUSH_IO | PGSTAT_BACKEND_FLUSH_WAL) |
Definition at line 626 of file pgstat_internal.h.
Definition at line 624 of file pgstat_internal.h.
#define PGSTAT_BACKEND_FLUSH_WAL (1 << 1) /* Flush WAL statistics */ |
Definition at line 625 of file pgstat_internal.h.
#define SLRU_NUM_ELEMENTS lengthof(slru_names) |
Definition at line 345 of file pgstat_internal.h.
typedef struct PgStat_EntryRef PgStat_EntryRef |
typedef struct PgStat_HashKey PgStat_HashKey |
typedef struct PgStat_KindInfo PgStat_KindInfo |
typedef struct PgStat_LocalState PgStat_LocalState |
typedef struct PgStat_ShmemControl PgStat_ShmemControl |
typedef struct PgStat_Snapshot PgStat_Snapshot |
typedef struct PgStat_SubXactStatus PgStat_SubXactStatus |
typedef struct PgStatShared_Archiver PgStatShared_Archiver |
typedef struct PgStatShared_Backend PgStatShared_Backend |
typedef struct PgStatShared_BgWriter PgStatShared_BgWriter |
typedef struct PgStatShared_Checkpointer PgStatShared_Checkpointer |
typedef struct PgStatShared_Common PgStatShared_Common |
typedef struct PgStatShared_Database PgStatShared_Database |
typedef struct PgStatShared_Function PgStatShared_Function |
typedef struct PgStatShared_HashEntry PgStatShared_HashEntry |
typedef struct PgStatShared_IO PgStatShared_IO |
typedef struct PgStatShared_Relation PgStatShared_Relation |
typedef struct PgStatShared_ReplSlot PgStatShared_ReplSlot |
typedef struct PgStatShared_SLRU PgStatShared_SLRU |
typedef struct PgStatShared_Subscription PgStatShared_Subscription |
typedef struct PgStatShared_Wal PgStatShared_Wal |
void AtEOSubXact_PgStat_Relations | ( | PgStat_SubXactStatus * | xact_state, |
bool | isCommit, | ||
int | nestDepth | ||
) |
Definition at line 609 of file pgstat_relation.c.
References Assert(), PgStat_TableStatus::counts, PgStat_TableCounts::delta_dead_tuples, PgStat_SubXactStatus::first, pfree(), pgstat_get_xact_stack_level(), restore_truncdrop_counters(), save_truncdrop_counters(), PgStat_TableStatus::trans, trans, PgStat_TableCounts::tuples_deleted, PgStat_TableCounts::tuples_inserted, and PgStat_TableCounts::tuples_updated.
Referenced by AtEOSubXact_PgStat().
void AtEOXact_PgStat_Database | ( | bool | isCommit, |
bool | parallel | ||
) |
Definition at line 249 of file pgstat_database.c.
References pgStatXactCommit, and pgStatXactRollback.
Referenced by AtEOXact_PgStat().
void AtEOXact_PgStat_Relations | ( | PgStat_SubXactStatus * | xact_state, |
bool | isCommit | ||
) |
Definition at line 551 of file pgstat_relation.c.
References Assert(), PgStat_TableCounts::changed_tuples, PgStat_TableStatus::counts, PgStat_TableCounts::delta_dead_tuples, PgStat_TableCounts::delta_live_tuples, PgStat_SubXactStatus::first, restore_truncdrop_counters(), PgStat_TableStatus::trans, trans, PgStat_TableCounts::truncdropped, PgStat_TableCounts::tuples_deleted, PgStat_TableCounts::tuples_inserted, and PgStat_TableCounts::tuples_updated.
Referenced by AtEOXact_PgStat().
void AtPrepare_PgStat_Relations | ( | PgStat_SubXactStatus * | xact_state | ) |
Definition at line 690 of file pgstat_relation.c.
References Assert(), TwoPhasePgStatRecord::deleted_pre_truncdrop, PgStat_SubXactStatus::first, TwoPhasePgStatRecord::id, TwoPhasePgStatRecord::inserted_pre_truncdrop, PG_USED_FOR_ASSERTS_ONLY, RegisterTwoPhaseRecord(), TwoPhasePgStatRecord::shared, trans, TwoPhasePgStatRecord::truncdropped, TwoPhasePgStatRecord::tuples_deleted, TwoPhasePgStatRecord::tuples_inserted, TwoPhasePgStatRecord::tuples_updated, TWOPHASE_RM_PGSTAT_ID, and TwoPhasePgStatRecord::updated_pre_truncdrop.
Referenced by AtPrepare_PgStat().
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.
void pgstat_attach_shmem | ( | void | ) |
Definition at line 244 of file pgstat_shmem.c.
References Assert(), PgStat_LocalState::dsa, dsa_attach_in_place(), dsa_pin_mapping(), dsh_params, dshash_attach(), PgStat_ShmemControl::hash_handle, MemoryContextSwitchTo(), pgStatLocal, PgStat_ShmemControl::raw_dsa_area, PgStat_LocalState::shared_hash, PgStat_LocalState::shmem, and TopMemoryContext.
Referenced by pgstat_initialize().
bool pgstat_backend_flush_cb | ( | bool | nowait | ) |
Definition at line 314 of file pgstat_backend.c.
References PGSTAT_BACKEND_FLUSH_ALL, and pgstat_flush_backend().
bool pgstat_backend_have_pending_cb | ( | void | ) |
Definition at line 300 of file pgstat_backend.c.
References backend_has_iostats, MyBackendType, pgstat_backend_wal_have_pending(), and pgstat_tracks_backend_bktype().
void pgstat_backend_reset_timestamp_cb | ( | PgStatShared_Common * | header, |
TimestampTz | ts | ||
) |
Definition at line 401 of file pgstat_backend.c.
Definition at line 816 of file pgstat_internal.h.
References CHECK_FOR_INTERRUPTS, and pg_read_barrier.
Referenced by pgstat_copy_changecounted_stats().
|
inlinestatic |
Definition at line 794 of file pgstat_internal.h.
References Assert(), pg_write_barrier, and START_CRIT_SECTION.
Referenced by pgstat_report_archiver(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), and pgstat_report_inj_fixed().
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.
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.
|
inlinestatic |
Definition at line 871 of file pgstat_internal.h.
|
inlinestatic |
Definition at line 855 of file pgstat_internal.h.
References len, pgstat_begin_changecount_read(), and pgstat_end_changecount_read().
Referenced by injection_stats_fixed_reset_all_cb(), injection_stats_fixed_snapshot_cb(), pgstat_archiver_reset_all_cb(), pgstat_archiver_snapshot_cb(), pgstat_bgwriter_reset_all_cb(), pgstat_bgwriter_snapshot_cb(), pgstat_checkpointer_reset_all_cb(), and pgstat_checkpointer_snapshot_cb().
void pgstat_create_transactional | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid | ||
) |
Definition at line 361 of file pgstat_xact.c.
References create_drop_transactional_internal(), ereport, errmsg(), name, pgstat_get_entry_ref(), pgstat_get_kind_info(), pgstat_reset(), and WARNING.
Referenced by pgstat_create_function(), pgstat_create_relation(), and pgstat_create_subscription().
bool pgstat_database_flush_cb | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 392 of file pgstat_database.c.
References Assert(), PgStat_StatDBEntry::checksum_failures, PgStat_StatDBEntry::last_autovac_time, PgStat_StatDBEntry::last_checksum_failure, PgStat_EntryRef::pending, PGSTAT_ACCUM_DBCOUNT, pgstat_lock_entry(), pgstat_unlock_entry(), and PgStat_EntryRef::shared_stats.
void pgstat_database_reset_timestamp_cb | ( | PgStatShared_Common * | header, |
TimestampTz | ts | ||
) |
Definition at line 457 of file pgstat_database.c.
void pgstat_delete_pending_entry | ( | PgStat_EntryRef * | entry_ref | ) |
Definition at line 1334 of file pgstat.c.
References Assert(), PgStat_KindInfo::delete_pending_cb, dlist_delete(), PgStatShared_HashEntry::key, PgStat_HashKey::kind, PgStat_EntryRef::pending, PgStat_EntryRef::pending_node, pfree(), pgstat_get_kind_info(), PgStat_Kind, and PgStat_EntryRef::shared_entry.
Referenced by pgstat_flush_pending_entries(), and pgstat_release_entry_ref().
void pgstat_detach_shmem | ( | void | ) |
Definition at line 264 of file pgstat_shmem.c.
References Assert(), PgStat_LocalState::dsa, dsa_detach(), dsa_release_in_place(), dshash_detach(), pgstat_release_all_entry_refs(), pgStatLocal, PgStat_ShmemControl::raw_dsa_area, PgStat_LocalState::shared_hash, and PgStat_LocalState::shmem.
Referenced by pgstat_shutdown_hook().
void pgstat_drop_all_entries | ( | void | ) |
Definition at line 1042 of file pgstat_shmem.c.
References pgstat_drop_matching_entries().
Referenced by pgstat_reset_after_failure().
bool pgstat_drop_entry | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid | ||
) |
Definition at line 953 of file pgstat_shmem.c.
References dshash_find(), PgStat_EntryRefHashEntry::entry_ref, PgStat_EntryRefHashEntry::key, sort-test::key, pgstat_drop_database_and_contents(), pgstat_drop_entry_internal(), PGSTAT_KIND_DATABASE, pgstat_release_entry_ref(), pgStatEntryRefHash, pgStatLocal, and PgStat_LocalState::shared_hash.
Referenced by AtEOSubXact_PgStat_DroppedStats(), AtEOXact_PgStat_DroppedStats(), pgstat_drop_inj(), pgstat_drop_replslot(), pgstat_execute_transactional_drops(), pgstat_init_function_usage(), and pgstat_shutdown_hook().
void pgstat_drop_matching_entries | ( | bool(*)(PgStatShared_HashEntry *, Datum) | do_drop, |
Datum | match_data | ||
) |
Definition at line 1001 of file pgstat_shmem.c.
References dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), PgStat_EntryRefHashEntry::entry_ref, PgStat_EntryRefHashEntry::key, pgstat_drop_entry_internal(), pgstat_release_entry_ref(), pgstat_request_entry_refs_gc(), pgStatEntryRefHash, pgStatLocal, ps, and PgStat_LocalState::shared_hash.
Referenced by injection_points_stats_drop(), and pgstat_drop_all_entries().
void pgstat_drop_transactional | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid | ||
) |
Definition at line 384 of file pgstat_xact.c.
References create_drop_transactional_internal().
Referenced by pgstat_drop_database(), pgstat_drop_function(), pgstat_drop_relation(), and pgstat_drop_subscription().
Definition at line 831 of file pgstat_internal.h.
References pg_read_barrier.
Referenced by pgstat_copy_changecounted_stats().
|
inlinestatic |
Definition at line 804 of file pgstat_internal.h.
References Assert(), END_CRIT_SECTION, and pg_write_barrier.
Referenced by pgstat_report_archiver(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), and pgstat_report_inj_fixed().
void * pgstat_fetch_entry | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid | ||
) |
Definition at line 949 of file pgstat.c.
References Assert(), PgStat_Snapshot::context, PgStat_SnapshotEntry::data, PgStatShared_HashEntry::dropped, PgStat_KindInfo::fixed_amount, IsPostmasterEnvironment, IsUnderPostmaster, sort-test::key, MemoryContextAlloc(), PgStat_Snapshot::mode, palloc(), pgstat_build_snapshot(), pgstat_fetch_consistency, PGSTAT_FETCH_CONSISTENCY_CACHE, PGSTAT_FETCH_CONSISTENCY_NONE, PGSTAT_FETCH_CONSISTENCY_SNAPSHOT, pgstat_get_entry_data(), pgstat_get_entry_ref(), pgstat_get_kind_info(), pgstat_lock_entry_shared(), pgstat_prep_snapshot(), pgstat_unlock_entry(), pgStatLocal, PgStat_KindInfo::shared_data_len, PgStat_EntryRef::shared_entry, PgStat_EntryRef::shared_stats, PgStat_LocalState::snapshot, and PgStat_Snapshot::stats.
Referenced by pgstat_fetch_replslot(), pgstat_fetch_stat_backend(), pgstat_fetch_stat_dbentry(), pgstat_fetch_stat_funcentry(), pgstat_fetch_stat_injentry(), pgstat_fetch_stat_subscription(), and pgstat_fetch_stat_tabentry_ext().
PgStat_EntryRef * pgstat_fetch_pending_entry | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid | ||
) |
Definition at line 1321 of file pgstat.c.
References PgStat_EntryRef::pending, and pgstat_get_entry_ref().
Referenced by find_funcstat_entry(), and find_tabstat_entry().
bool pgstat_flush_backend | ( | bool | nowait, |
bits32 | flags | ||
) |
Definition at line 259 of file pgstat_backend.c.
References backend_has_iostats, InvalidOid, MyBackendType, MyProcNumber, PGSTAT_BACKEND_FLUSH_IO, PGSTAT_BACKEND_FLUSH_WAL, pgstat_backend_wal_have_pending(), pgstat_flush_backend_entry_io(), pgstat_flush_backend_entry_wal(), pgstat_get_entry_ref_locked(), PGSTAT_KIND_BACKEND, pgstat_tracks_backend_bktype(), and pgstat_unlock_entry().
Referenced by pgstat_backend_flush_cb(), pgstat_report_analyze(), pgstat_report_vacuum(), and pgstat_report_wal().
void pgstat_flush_io | ( | bool | nowait | ) |
Definition at line 183 of file pgstat_io.c.
References pgstat_io_flush_cb().
Referenced by pgstat_report_analyze(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), pgstat_report_vacuum(), and pgstat_report_wal().
bool pgstat_function_flush_cb | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 193 of file pgstat_function.c.
References INSTR_TIME_GET_MICROSEC, PgStat_FunctionCounts::numcalls, PgStat_StatFuncEntry::numcalls, PgStat_EntryRef::pending, pgstat_lock_entry(), pgstat_unlock_entry(), PgStat_FunctionCounts::self_time, PgStat_StatFuncEntry::self_time, PgStat_EntryRef::shared_stats, PgStatShared_Function::stats, PgStat_FunctionCounts::total_time, and PgStat_StatFuncEntry::total_time.
|
inlinestatic |
Definition at line 914 of file pgstat_internal.h.
References Assert(), PgStat_ShmemControl::custom_data, idx(), pgstat_get_kind_info(), pgstat_is_kind_custom(), PGSTAT_KIND_CUSTOM_MIN, pgStatLocal, and PgStat_LocalState::shmem.
Referenced by injection_stats_fixed_reset_all_cb(), injection_stats_fixed_snapshot_cb(), and pgstat_report_inj_fixed().
|
inlinestatic |
Definition at line 929 of file pgstat_internal.h.
References Assert(), PgStat_Snapshot::custom_data, idx(), pgstat_get_kind_info(), pgstat_is_kind_custom(), PGSTAT_KIND_CUSTOM_MIN, pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by injection_points_stats_fixed(), and injection_stats_fixed_snapshot_cb().
|
inlinestatic |
Definition at line 900 of file pgstat_internal.h.
References Assert(), PG_UINT32_MAX, pgstat_get_kind_info(), and PgStat_KindInfo::shared_data_off.
Referenced by pgstat_build_snapshot(), pgstat_fetch_entry(), pgstat_read_statsfile(), pgstat_reinit_entry(), pgstat_write_statsfile(), and shared_stat_reset_contents().
|
inlinestatic |
Definition at line 891 of file pgstat_internal.h.
References pgstat_get_kind_info(), and PgStat_KindInfo::shared_data_len.
Referenced by pgstat_read_statsfile(), pgstat_reinit_entry(), pgstat_write_statsfile(), and shared_stat_reset_contents().
PgStat_EntryRef * pgstat_get_entry_ref | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid, | ||
bool | create, | ||
bool * | created_entry | ||
) |
Definition at line 444 of file pgstat_shmem.c.
References Assert(), PgStatShared_HashEntry::body, PgStatShared_HashEntry::dropped, PgStat_LocalState::dsa, dsa_get_address(), dshash_find(), dshash_find_or_insert(), dshash_release_lock(), PgStat_ShmemControl::is_shutdown, sort-test::key, pgstat_acquire_entry_ref(), pgstat_assert_is_up, pgstat_gc_entry_refs(), pgstat_get_entry_ref_cached(), pgstat_init_entry(), pgstat_need_entry_refs_gc(), pgstat_reinit_entry(), pgstat_release_entry_ref(), pgstat_setup_memcxt(), pgstat_setup_shared_refs(), pgStatLocal, PgStat_LocalState::shared_hash, and PgStat_LocalState::shmem.
Referenced by pgstat_acquire_replslot(), pgstat_create_subscription(), pgstat_create_transactional(), pgstat_fetch_entry(), pgstat_fetch_pending_entry(), pgstat_get_entry_ref_locked(), pgstat_have_entry(), pgstat_prep_pending_entry(), and pgstat_reset_entry().
PgStat_EntryRef * pgstat_get_entry_ref_locked | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid, | ||
bool | nowait | ||
) |
Definition at line 684 of file pgstat_shmem.c.
References pgstat_get_entry_ref(), and pgstat_lock_entry().
Referenced by pgstat_copy_relation_stats(), pgstat_create_backend(), pgstat_create_replslot(), pgstat_flush_backend(), pgstat_report_analyze(), pgstat_report_autovac(), pgstat_report_checksum_failures_in_db(), pgstat_report_replslot(), pgstat_report_vacuum(), and pgstat_reset_database_timestamp().
const PgStat_KindInfo * pgstat_get_kind_info | ( | PgStat_Kind | kind | ) |
Definition at line 1453 of file pgstat.c.
References idx(), pgstat_is_kind_builtin(), pgstat_is_kind_custom(), pgstat_kind_builtin_infos, pgstat_kind_custom_infos, and PGSTAT_KIND_CUSTOM_MIN.
Referenced by pgstat_build_snapshot(), pgstat_build_snapshot_fixed(), pgstat_create_transactional(), pgstat_delete_pending_entry(), pgstat_drop_entry_internal(), pgstat_fetch_entry(), pgstat_flush_pending_entries(), pgstat_get_custom_shmem_data(), pgstat_get_custom_snapshot_data(), pgstat_get_entry_data(), pgstat_get_entry_len(), pgstat_have_entry(), pgstat_init_entry(), pgstat_init_snapshot_fixed(), pgstat_initialize(), pgstat_prep_pending_entry(), pgstat_read_statsfile(), pgstat_report_stat(), pgstat_reset(), pgstat_reset_after_failure(), pgstat_reset_entry(), pgstat_reset_of_kind(), pgstat_snapshot_fixed(), pgstat_write_statsfile(), shared_stat_reset_contents(), StatsShmemInit(), and StatsShmemSize().
PgStat_SubXactStatus * pgstat_get_xact_stack_level | ( | int | nest_level | ) |
Definition at line 238 of file pgstat_xact.c.
References dclist_init(), PgStat_SubXactStatus::first, MemoryContextAlloc(), PgStat_SubXactStatus::nest_level, PgStat_SubXactStatus::pending_drops, pgStatXactStack, PgStat_SubXactStatus::prev, and TopTransactionContext.
Referenced by add_tabstat_xact_level(), AtEOSubXact_PgStat_DroppedStats(), AtEOSubXact_PgStat_Relations(), and create_drop_transactional_internal().
|
inlinestatic |
Definition at line 878 of file pgstat_internal.h.
References arg, Assert(), fasthash32(), and sort-test::key.
PgStatShared_Common * pgstat_init_entry | ( | PgStat_Kind | kind, |
PgStatShared_HashEntry * | shhashent | ||
) |
Definition at line 293 of file pgstat_shmem.c.
References PgStatShared_HashEntry::body, PgStatShared_HashEntry::dropped, PgStat_LocalState::dsa, dsa_allocate0, dsa_get_address(), PgStatShared_HashEntry::generation, PgStatShared_Common::lock, LWLockInitialize(), LWTRANCHE_PGSTATS_DATA, PgStatShared_Common::magic, pg_atomic_init_u32(), pgstat_get_kind_info(), pgStatLocal, and PgStatShared_HashEntry::refcount.
Referenced by pgstat_get_entry_ref(), and pgstat_read_statsfile().
bool pgstat_io_flush_cb | ( | bool | nowait | ) |
Definition at line 197 of file pgstat_io.c.
References Assert(), PgStat_BktypeIO::bytes, PgStat_PendingIO::bytes, PgStat_BktypeIO::counts, PgStat_PendingIO::counts, have_iostats, INSTR_TIME_GET_MICROSEC, PgStat_ShmemControl::io, IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, IOOP_NUM_TYPES, PgStatShared_IO::locks, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MyBackendType, PgStat_PendingIO::pending_times, PendingIOStats, pgstat_bktype_io_stats_valid(), pgStatLocal, PgStat_LocalState::shmem, PgStat_IO::stats, PgStatShared_IO::stats, and PgStat_BktypeIO::times.
Referenced by pgstat_flush_io().
bool pgstat_io_have_pending_cb | ( | void | ) |
Definition at line 174 of file pgstat_io.c.
References have_iostats.
void pgstat_io_init_shmem_cb | ( | void * | stats | ) |
Definition at line 286 of file pgstat_io.c.
References BACKEND_NUM_TYPES, i, PgStatShared_IO::locks, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_io_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 295 of file pgstat_io.c.
References BACKEND_NUM_TYPES, i, PgStat_ShmemControl::io, PgStatShared_IO::locks, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_IO::stat_reset_timestamp, PgStat_IO::stats, and PgStatShared_IO::stats.
void pgstat_io_snapshot_cb | ( | void | ) |
Definition at line 317 of file pgstat_io.c.
References BACKEND_NUM_TYPES, i, PgStat_ShmemControl::io, PgStat_Snapshot::io, PgStatShared_IO::locks, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, PgStat_IO::stat_reset_timestamp, PgStat_IO::stats, and PgStatShared_IO::stats.
bool pgstat_lock_entry | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 647 of file pgstat_shmem.c.
References PgStatShared_Common::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), and PgStat_EntryRef::shared_stats.
Referenced by injection_stats_flush_cb(), pgstat_database_flush_cb(), pgstat_function_flush_cb(), pgstat_get_entry_ref_locked(), pgstat_relation_flush_cb(), pgstat_reset_entry(), and pgstat_subscription_flush_cb().
bool pgstat_lock_entry_shared | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 663 of file pgstat_shmem.c.
References PgStatShared_Common::lock, LW_SHARED, LWLockAcquire(), LWLockConditionalAcquire(), and PgStat_EntryRef::shared_stats.
Referenced by pgstat_fetch_entry().
PgStat_StatDBEntry * pgstat_prep_database_pending | ( | Oid | dboid | ) |
Definition at line 350 of file pgstat_database.c.
References Assert(), InvalidOid, MyDatabaseId, OidIsValid, PgStat_EntryRef::pending, PGSTAT_KIND_DATABASE, and pgstat_prep_pending_entry().
Referenced by pgstat_relation_flush_cb(), pgstat_report_connect(), pgstat_report_deadlock(), pgstat_report_disconnect(), pgstat_report_recovery_conflict(), pgstat_report_tempfile(), pgstat_update_dbstats(), and pgstat_update_parallel_workers_stats().
PgStat_EntryRef * pgstat_prep_pending_entry | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid, | ||
bool * | created_entry | ||
) |
Definition at line 1283 of file pgstat.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert(), dlist_push_tail(), MemoryContextAllocZero(), PgStat_EntryRef::pending, PgStat_EntryRef::pending_node, PgStat_KindInfo::pending_size, pgstat_get_entry_ref(), pgstat_get_kind_info(), pgStatPending, pgStatPendingContext, TopMemoryContext, and unlikely.
Referenced by pgstat_create_inj(), pgstat_init_function_usage(), pgstat_prep_database_pending(), pgstat_prep_relation_pending(), pgstat_report_inj(), pgstat_report_subscription_conflict(), and pgstat_report_subscription_error().
void pgstat_register_kind | ( | PgStat_Kind | kind, |
const PgStat_KindInfo * | kind_info | ||
) |
Definition at line 1481 of file pgstat.c.
References ereport, errdetail(), errhint(), errmsg(), ERROR, PgStat_KindInfo::fixed_amount, idx(), LOG, MemoryContextAllocZero(), name, PgStat_KindInfo::name, pg_strcasecmp(), pgstat_is_kind_custom(), PgStat_Kind, pgstat_kind_custom_infos, PGSTAT_KIND_CUSTOM_MAX, PGSTAT_KIND_CUSTOM_MIN, PGSTAT_KIND_CUSTOM_SIZE, process_shared_preload_libraries_in_progress, PgStat_KindInfo::shared_size, and TopMemoryContext.
Referenced by pgstat_register_inj(), and pgstat_register_inj_fixed().
void pgstat_relation_delete_pending_cb | ( | PgStat_EntryRef * | entry_ref | ) |
Definition at line 896 of file pgstat_relation.c.
References if(), PgStat_EntryRef::pending, pgstat_unlink_relation(), and PgStat_TableStatus::relation.
bool pgstat_relation_flush_cb | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 816 of file pgstat_relation.c.
References PgStat_TableCounts::blocks_fetched, PgStat_StatDBEntry::blocks_fetched, PgStat_StatTabEntry::blocks_fetched, PgStat_TableCounts::blocks_hit, PgStat_StatDBEntry::blocks_hit, PgStat_StatTabEntry::blocks_hit, PgStat_TableCounts::changed_tuples, PgStat_TableStatus::counts, PgStat_HashKey::dboid, PgStat_StatTabEntry::dead_tuples, PgStat_TableCounts::delta_dead_tuples, PgStat_TableCounts::delta_live_tuples, GetCurrentTransactionStopTimestamp(), PgStat_StatTabEntry::ins_since_vacuum, PgStatShared_HashEntry::key, PgStat_StatTabEntry::lastscan, PgStat_StatTabEntry::live_tuples, Max, PgStat_StatTabEntry::mod_since_analyze, PgStat_TableCounts::numscans, PgStat_StatTabEntry::numscans, PgStat_EntryRef::pending, pg_memory_is_all_zeros(), pgstat_lock_entry(), pgstat_prep_database_pending(), pgstat_unlock_entry(), PgStat_EntryRef::shared_entry, PgStat_EntryRef::shared_stats, PgStatShared_Relation::stats, PgStat_TableCounts::truncdropped, PgStat_TableCounts::tuples_deleted, PgStat_StatDBEntry::tuples_deleted, PgStat_StatTabEntry::tuples_deleted, PgStat_TableCounts::tuples_fetched, PgStat_StatDBEntry::tuples_fetched, PgStat_StatTabEntry::tuples_fetched, PgStat_TableCounts::tuples_hot_updated, PgStat_StatTabEntry::tuples_hot_updated, PgStat_TableCounts::tuples_inserted, PgStat_StatDBEntry::tuples_inserted, PgStat_StatTabEntry::tuples_inserted, PgStat_TableCounts::tuples_newpage_updated, PgStat_StatTabEntry::tuples_newpage_updated, PgStat_TableCounts::tuples_returned, PgStat_StatDBEntry::tuples_returned, PgStat_StatTabEntry::tuples_returned, PgStat_TableCounts::tuples_updated, PgStat_StatDBEntry::tuples_updated, and PgStat_StatTabEntry::tuples_updated.
bool pgstat_replslot_from_serialized_name_cb | ( | const NameData * | name, |
PgStat_HashKey * | key | ||
) |
Definition at line 202 of file pgstat_replslot.c.
References get_replslot_index(), idx(), InvalidOid, sort-test::key, name, NameStr, and PGSTAT_KIND_REPLSLOT.
void pgstat_replslot_reset_timestamp_cb | ( | PgStatShared_Common * | header, |
TimestampTz | ts | ||
) |
Definition at line 218 of file pgstat_replslot.c.
void pgstat_replslot_to_serialized_name_cb | ( | const PgStat_HashKey * | key, |
const PgStatShared_Common * | header, | ||
NameData * | name | ||
) |
Definition at line 189 of file pgstat_replslot.c.
References elog, ERROR, sort-test::key, name, and ReplicationSlotName().
void pgstat_report_disconnect | ( | Oid | dboid | ) |
Definition at line 208 of file pgstat_database.c.
References DISCONNECT_CLIENT_EOF, DISCONNECT_FATAL, DISCONNECT_KILLED, DISCONNECT_NORMAL, DISCONNECT_NOT_YET, MyDatabaseId, pgstat_prep_database_pending(), pgstat_should_report_connstat(), pgStatSessionEndCause, PgStat_StatDBEntry::sessions_abandoned, PgStat_StatDBEntry::sessions_fatal, and PgStat_StatDBEntry::sessions_killed.
Referenced by pgstat_shutdown_hook().
void pgstat_request_entry_refs_gc | ( | void | ) |
Definition at line 700 of file pgstat_shmem.c.
References PgStat_ShmemControl::gc_request_count, pg_atomic_fetch_add_u64(), pgStatLocal, and PgStat_LocalState::shmem.
Referenced by AtEOSubXact_PgStat_DroppedStats(), AtEOXact_PgStat_DroppedStats(), pgstat_drop_database_and_contents(), pgstat_drop_inj(), pgstat_drop_matching_entries(), pgstat_drop_replslot(), pgstat_execute_transactional_drops(), and pgstat_shutdown_hook().
void pgstat_reset_database_timestamp | ( | Oid | dboid, |
TimestampTz | ts | ||
) |
Definition at line 371 of file pgstat_database.c.
References InvalidOid, MyDatabaseId, pgstat_get_entry_ref_locked(), PGSTAT_KIND_DATABASE, pgstat_unlock_entry(), PgStat_EntryRef::shared_stats, PgStat_StatDBEntry::stat_reset_timestamp, and PgStatShared_Database::stats.
Referenced by pgstat_reset().
void pgstat_reset_entries_of_kind | ( | PgStat_Kind | kind, |
TimestampTz | ts | ||
) |
Definition at line 1120 of file pgstat_shmem.c.
References Int32GetDatum(), match_kind(), and pgstat_reset_matching_entries().
Referenced by pgstat_reset_of_kind().
void pgstat_reset_entry | ( | PgStat_Kind | kind, |
Oid | dboid, | ||
uint64 | objid, | ||
TimestampTz | ts | ||
) |
Definition at line 1064 of file pgstat_shmem.c.
References Assert(), PgStatShared_HashEntry::dropped, pgstat_get_entry_ref(), pgstat_get_kind_info(), pgstat_lock_entry(), pgstat_unlock_entry(), PgStat_EntryRef::shared_entry, shared_stat_reset_contents(), and PgStat_EntryRef::shared_stats.
Referenced by pgstat_create_subscription(), and pgstat_reset().
void pgstat_reset_matching_entries | ( | bool(*)(PgStatShared_HashEntry *, Datum) | do_reset, |
Datum | match_data, | ||
TimestampTz | ts | ||
) |
Definition at line 1084 of file pgstat_shmem.c.
References PgStatShared_HashEntry::body, PgStatShared_HashEntry::dropped, PgStat_LocalState::dsa, dsa_get_address(), dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), PgStatShared_HashEntry::key, PgStat_HashKey::kind, PgStatShared_Common::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shared_hash, and shared_stat_reset_contents().
Referenced by pgstat_reset_counters(), and pgstat_reset_entries_of_kind().
bool pgstat_slru_flush_cb | ( | bool | nowait | ) |
Definition at line 165 of file pgstat_slru.c.
References blocks_written, have_slrustats, i, PgStatShared_SLRU::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MemSet, pending_SLRUStats, pgStatLocal, PgStat_LocalState::shmem, PgStat_ShmemControl::slru, SLRU_ACC, SLRU_NUM_ELEMENTS, and PgStatShared_SLRU::stats.
bool pgstat_slru_have_pending_cb | ( | void | ) |
Definition at line 150 of file pgstat_slru.c.
References have_slrustats.
void pgstat_slru_init_shmem_cb | ( | void * | stats | ) |
Definition at line 205 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_slru_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 213 of file pgstat_slru.c.
References i, pgstat_reset_slru_counter_internal(), and SLRU_NUM_ELEMENTS.
void pgstat_slru_snapshot_cb | ( | void | ) |
Definition at line 220 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_ShmemControl::slru, PgStat_Snapshot::slru, PgStat_LocalState::snapshot, and PgStatShared_SLRU::stats.
void pgstat_snapshot_fixed | ( | PgStat_Kind | kind | ) |
Definition at line 1078 of file pgstat.c.
References Assert(), PgStat_Snapshot::custom_valid, PgStat_Snapshot::fixed_valid, force_stats_snapshot_clear, pgstat_build_snapshot(), pgstat_build_snapshot_fixed(), pgstat_clear_snapshot(), pgstat_fetch_consistency, PGSTAT_FETCH_CONSISTENCY_SNAPSHOT, pgstat_get_kind_info(), pgstat_is_kind_builtin(), pgstat_is_kind_custom(), pgstat_is_kind_valid(), PGSTAT_KIND_CUSTOM_MIN, pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by injection_points_stats_fixed(), pgstat_fetch_slru(), pgstat_fetch_stat_archiver(), pgstat_fetch_stat_bgwriter(), pgstat_fetch_stat_checkpointer(), pgstat_fetch_stat_io(), and pgstat_fetch_stat_wal().
bool pgstat_subscription_flush_cb | ( | PgStat_EntryRef * | entry_ref, |
bool | nowait | ||
) |
Definition at line 103 of file pgstat_subscription.c.
References CONFLICT_NUM_TYPES, i, PgStat_EntryRef::pending, pgstat_lock_entry(), pgstat_unlock_entry(), PgStat_EntryRef::shared_stats, and SUB_ACC.
void pgstat_subscription_reset_timestamp_cb | ( | PgStatShared_Common * | header, |
TimestampTz | ts | ||
) |
Definition at line 128 of file pgstat_subscription.c.
void pgstat_unlock_entry | ( | PgStat_EntryRef * | entry_ref | ) |
Definition at line 675 of file pgstat_shmem.c.
References PgStatShared_Common::lock, LWLockRelease(), and PgStat_EntryRef::shared_stats.
Referenced by injection_stats_flush_cb(), pgstat_copy_relation_stats(), pgstat_create_backend(), pgstat_create_replslot(), pgstat_database_flush_cb(), pgstat_fetch_entry(), pgstat_flush_backend(), pgstat_function_flush_cb(), pgstat_relation_flush_cb(), pgstat_report_analyze(), pgstat_report_autovac(), pgstat_report_checksum_failures_in_db(), pgstat_report_replslot(), pgstat_report_vacuum(), pgstat_reset_database_timestamp(), pgstat_reset_entry(), and pgstat_subscription_flush_cb().
void pgstat_update_dbstats | ( | TimestampTz | ts | ) |
Definition at line 287 of file pgstat_database.c.
References PgStat_StatDBEntry::active_time, PgStat_StatDBEntry::blk_read_time, PgStat_StatDBEntry::blk_write_time, PgStat_StatDBEntry::idle_in_transaction_time, MyDatabaseId, OidIsValid, pgLastSessionReportTime, pgstat_prep_database_pending(), pgstat_should_report_connstat(), pgStatActiveTime, pgStatBlockReadTime, pgStatBlockWriteTime, pgStatTransactionIdleTime, pgStatXactCommit, pgStatXactRollback, PgStat_StatDBEntry::session_time, TimestampDifference(), PgStat_StatDBEntry::xact_commit, and PgStat_StatDBEntry::xact_rollback.
Referenced by pgstat_report_stat().
bool pgstat_wal_flush_cb | ( | bool | nowait | ) |
Definition at line 82 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_cb(), pgStatLocal, pgWalUsage, prevWalUsage, PgStat_LocalState::shmem, PgStat_ShmemControl::wal, WALSTAT_ACC, and WalUsageAccumDiff().
Referenced by pgstat_report_wal().
bool pgstat_wal_have_pending_cb | ( | void | ) |
Definition at line 143 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 129 of file pgstat_wal.c.
References pgWalUsage, and prevWalUsage.
void pgstat_wal_init_shmem_cb | ( | void * | stats | ) |
Definition at line 149 of file pgstat_wal.c.
References PgStatShared_Wal::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_wal_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 157 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 168 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.
void PostPrepare_PgStat_Relations | ( | PgStat_SubXactStatus * | xact_state | ) |
Definition at line 728 of file pgstat_relation.c.
References PgStat_SubXactStatus::first, PgStat_TableStatus::trans, and trans.
Referenced by PostPrepare_PgStat().
|
extern |
Definition at line 212 of file pgstat.c.
Referenced by pgstat_acquire_entry_ref(), pgstat_archiver_reset_all_cb(), pgstat_archiver_snapshot_cb(), pgstat_attach_shmem(), pgstat_before_server_shutdown(), pgstat_bgwriter_reset_all_cb(), pgstat_bgwriter_snapshot_cb(), pgstat_build_snapshot(), pgstat_build_snapshot_fixed(), pgstat_checkpointer_reset_all_cb(), pgstat_checkpointer_snapshot_cb(), pgstat_clear_snapshot(), pgstat_detach_shmem(), pgstat_drop_database_and_contents(), pgstat_drop_entry(), pgstat_drop_entry_internal(), pgstat_drop_matching_entries(), pgstat_fetch_entry(), pgstat_fetch_slru(), pgstat_fetch_stat_archiver(), pgstat_fetch_stat_bgwriter(), pgstat_fetch_stat_checkpointer(), pgstat_fetch_stat_io(), pgstat_fetch_stat_wal(), pgstat_free_entry(), pgstat_gc_entry_refs(), pgstat_get_custom_shmem_data(), pgstat_get_custom_snapshot_data(), pgstat_get_entry_ref(), pgstat_get_stat_snapshot_timestamp(), pgstat_init_entry(), pgstat_init_snapshot_fixed(), pgstat_io_flush_cb(), pgstat_io_reset_all_cb(), pgstat_io_snapshot_cb(), pgstat_need_entry_refs_gc(), pgstat_prep_snapshot(), pgstat_read_statsfile(), pgstat_reinit_entry(), pgstat_release_entry_ref(), pgstat_report_archiver(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), pgstat_report_stat(), pgstat_request_entry_refs_gc(), pgstat_reset_matching_entries(), pgstat_reset_slru_counter_internal(), pgstat_setup_shared_refs(), pgstat_slru_flush_cb(), pgstat_slru_snapshot_cb(), pgstat_snapshot_fixed(), pgstat_wal_flush_cb(), pgstat_wal_reset_all_cb(), pgstat_wal_snapshot_cb(), pgstat_write_statsfile(), and StatsShmemInit().
|
static |
Definition at line 334 of file pgstat_internal.h.
Referenced by pgstat_get_slru_index(), and pgstat_get_slru_name().