51 .
name =
"injection_points_fixed",
53 .write_to_file =
true,
67 #define PGSTAT_KIND_INJECTION_FIXED 130
90 sizeof(stats_shmem->
stats),
108 sizeof(stats_shmem->
stats),
112 memcpy(&
reset, reset_offset,
sizeof(stats_shmem->
stats));
116 #define FIXED_COMP(fld) stat_snap->fld -= reset.fld;
static Datum values[MAXATTR]
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
Datum Int64GetDatum(int64 X)
#define PG_RETURN_DATUM(x)
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
struct PgStat_StatInjFixedEntry PgStat_StatInjFixedEntry
static void injection_stats_fixed_reset_all_cb(TimestampTz ts)
static bool inj_fixed_loaded
void pgstat_register_inj_fixed(void)
Datum injection_points_stats_fixed(PG_FUNCTION_ARGS)
#define PGSTAT_KIND_INJECTION_FIXED
struct PgStatShared_InjectionPointFixed PgStatShared_InjectionPointFixed
void pgstat_report_inj_fixed(uint32 numattach, uint32 numdetach, uint32 numrun, uint32 numcached, uint32 numloaded)
static const PgStat_KindInfo injection_stats_fixed
static void injection_stats_fixed_snapshot_cb(void)
static void injection_stats_fixed_init_shmem_cb(void *stats)
PG_FUNCTION_INFO_V1(injection_points_stats_fixed)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
void LWLockInitialize(LWLock *lock, int tranche_id)
void pgstat_snapshot_fixed(PgStat_Kind kind)
void pgstat_register_kind(PgStat_Kind kind, const PgStat_KindInfo *kind_info)
static void * pgstat_get_custom_snapshot_data(PgStat_Kind kind)
static void * pgstat_get_custom_shmem_data(PgStat_Kind kind)
static void pgstat_end_changecount_write(uint32 *cc)
static void pgstat_begin_changecount_write(uint32 *cc)
static void pgstat_copy_changecounted_stats(void *dst, void *src, size_t len, uint32 *cc)
PgStat_StatInjFixedEntry stats
PgStat_StatInjFixedEntry reset_offset
TimestampTz stat_reset_timestamp
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)