PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | REPLSLOT_ACC(fld) statent->fld += repSlotStat->fld |
Functions | |
static int | get_replslot_index (const char *name, bool need_lock) |
void | pgstat_reset_replslot (const char *name) |
void | pgstat_report_replslot (ReplicationSlot *slot, const PgStat_StatReplSlotEntry *repSlotStat) |
void | pgstat_create_replslot (ReplicationSlot *slot) |
void | pgstat_acquire_replslot (ReplicationSlot *slot) |
void | pgstat_drop_replslot (ReplicationSlot *slot) |
PgStat_StatReplSlotEntry * | pgstat_fetch_replslot (NameData slotname) |
void | pgstat_replslot_to_serialized_name_cb (const PgStat_HashKey *key, const PgStatShared_Common *header, NameData *name) |
bool | pgstat_replslot_from_serialized_name_cb (const NameData *name, PgStat_HashKey *key) |
void | pgstat_replslot_reset_timestamp_cb (PgStatShared_Common *header, TimestampTz ts) |
#define REPLSLOT_ACC | ( | fld | ) | statent->fld += repSlotStat->fld |
|
static |
Definition at line 224 of file pgstat_replslot.c.
References Assert, name, ReplicationSlotIndex(), and SearchNamedReplicationSlot().
Referenced by pgstat_fetch_replslot(), and pgstat_replslot_from_serialized_name_cb().
void pgstat_acquire_replslot | ( | ReplicationSlot * | slot | ) |
Definition at line 146 of file pgstat_replslot.c.
References InvalidOid, pgstat_get_entry_ref(), PGSTAT_KIND_REPLSLOT, and ReplicationSlotIndex().
Referenced by ReplicationSlotAcquire().
void pgstat_create_replslot | ( | ReplicationSlot * | slot | ) |
Definition at line 111 of file pgstat_replslot.c.
References Assert, InvalidOid, LW_EXCLUSIVE, LWLockHeldByMeInMode(), pgstat_get_entry_ref_locked(), PGSTAT_KIND_REPLSLOT, pgstat_unlock_entry(), ReplicationSlotIndex(), PgStat_EntryRef::shared_stats, and PgStatShared_ReplSlot::stats.
Referenced by ReplicationSlotCreate().
void pgstat_drop_replslot | ( | ReplicationSlot * | slot | ) |
Definition at line 156 of file pgstat_replslot.c.
References Assert, InvalidOid, LW_EXCLUSIVE, LWLockHeldByMeInMode(), pgstat_drop_entry(), PGSTAT_KIND_REPLSLOT, pgstat_request_entry_refs_gc(), and ReplicationSlotIndex().
Referenced by ReplicationSlotDropPtr().
PgStat_StatReplSlotEntry* pgstat_fetch_replslot | ( | NameData | slotname | ) |
Definition at line 170 of file pgstat_replslot.c.
References get_replslot_index(), idx(), InvalidOid, LW_SHARED, LWLockAcquire(), LWLockRelease(), NameStr, pgstat_fetch_entry(), and PGSTAT_KIND_REPLSLOT.
Referenced by pg_stat_get_replication_slot().
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_replslot | ( | ReplicationSlot * | slot, |
const PgStat_StatReplSlotEntry * | repSlotStat | ||
) |
Definition at line 78 of file pgstat_replslot.c.
References InvalidOid, pgstat_get_entry_ref_locked(), PGSTAT_KIND_REPLSLOT, pgstat_unlock_entry(), ReplicationSlotIndex(), REPLSLOT_ACC, PgStat_EntryRef::shared_stats, and PgStatShared_ReplSlot::stats.
Referenced by UpdateDecodingStats().
void pgstat_reset_replslot | ( | const char * | name | ) |
Definition at line 42 of file pgstat_replslot.c.
References Assert, ereport, errcode(), errmsg(), ERROR, InvalidOid, LW_SHARED, LWLockAcquire(), LWLockRelease(), name, PGSTAT_KIND_REPLSLOT, pgstat_reset(), ReplicationSlotIndex(), SearchNamedReplicationSlot(), and SlotIsLogical.
Referenced by pg_stat_reset_replication_slot().