40 .
name =
"injection_points",
41 .fixed_amount =
false,
42 .write_to_file =
true,
45 .accessed_across_databases =
true,
57 #define PGSTAT_INJ_IDX(name) hash_bytes_extended((const unsigned char *) name, strlen(name), 0)
62 #define PGSTAT_KIND_INJECTION 129
135 memset(&shstatent->
stats, 0,
sizeof(shstatent->
stats));
175 statent = &shstatent->
stats;
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_INT64(x)
void pgstat_report_inj(const char *name)
void pgstat_register_inj(void)
static bool inj_stats_loaded
#define PGSTAT_INJ_IDX(name)
void pgstat_create_inj(const char *name)
struct PgStat_StatInjEntry PgStat_StatInjEntry
void pgstat_drop_inj(const char *name)
#define PGSTAT_KIND_INJECTION
PG_FUNCTION_INFO_V1(injection_points_stats_numcalls)
static PgStat_StatInjEntry * pgstat_fetch_stat_injentry(const char *name)
static bool injection_stats_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)
static const PgStat_KindInfo injection_stats
struct PgStatShared_InjectionPoint PgStatShared_InjectionPoint
Datum injection_points_stats_numcalls(PG_FUNCTION_ARGS)
void * pgstat_fetch_entry(PgStat_Kind kind, Oid dboid, uint64 objid)
void pgstat_register_kind(PgStat_Kind kind, const PgStat_KindInfo *kind_info)
void pgstat_request_entry_refs_gc(void)
bool pgstat_drop_entry(PgStat_Kind kind, Oid dboid, uint64 objid)
void pgstat_unlock_entry(PgStat_EntryRef *entry_ref)
PgStat_EntryRef * pgstat_get_entry_ref_locked(PgStat_Kind kind, Oid dboid, uint64 objid, bool nowait)
bool pgstat_lock_entry(PgStat_EntryRef *entry_ref, bool nowait)
PgStat_StatInjEntry stats
PgStatShared_Common header
PgStatShared_Common * shared_stats
char * text_to_cstring(const text *t)