59 if (backend_io->
times[io_object][io_context][io_op] != 0 &&
60 backend_io->
counts[io_object][io_context][io_op] <= 0)
67 if (backend_io->
counts[io_object][io_context][io_op] != 0)
216 bktype_shstats->
counts[io_object][io_context][io_op] +=
221 bktype_shstats->
times[io_object][io_context][io_op] +=
253 elog(
ERROR,
"unrecognized IOContext value: %d", io_context);
265 return "temp relation";
268 elog(
ERROR,
"unrecognized IOObject value: %d", io_object);
298 memset(bktype_shstats, 0,
sizeof(*bktype_shstats));
323 *bktype_snap = *bktype_shstats;
454 bool strategy_io_context;
492 if (!strategy_io_context && io_op ==
IOOP_REUSE)
500 if (strategy_io_context && io_op ==
IOOP_FSYNC)
#define Assert(condition)
#define INSTR_TIME_SET_CURRENT(t)
#define INSTR_TIME_ADD(x, y)
#define INSTR_TIME_SUBTRACT(x, y)
#define INSTR_TIME_GET_MICROSEC(t)
#define INSTR_TIME_SET_ZERO(t)
BufferUsage pgBufferUsage
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
void LWLockInitialize(LWLock *lock, int tranche_id)
bool LWLockConditionalAcquire(LWLock *lock, LWLockMode mode)
#define BACKEND_NUM_TYPES
BackendType MyBackendType
void pgstat_snapshot_fixed(PgStat_Kind kind)
PgStat_LocalState pgStatLocal
#define pgstat_count_buffer_read_time(n)
#define pgstat_count_buffer_write_time(n)
#define IOCONTEXT_NUM_TYPES
#define IOOBJECT_NUM_TYPES
instr_time pgstat_prepare_io_time(bool track_io_guc)
void pgstat_flush_io(bool nowait)
void pgstat_count_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op, instr_time start_time, uint32 cnt)
struct PgStat_PendingIO PgStat_PendingIO
bool pgstat_tracks_io_bktype(BackendType bktype)
bool pgstat_io_have_pending_cb(void)
bool pgstat_io_flush_cb(bool nowait)
const char * pgstat_get_io_object_name(IOObject io_object)
void pgstat_io_reset_all_cb(TimestampTz ts)
bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io, BackendType bktype)
static PgStat_PendingIO PendingIOStats
PgStat_IO * pgstat_fetch_stat_io(void)
bool pgstat_tracks_io_op(BackendType bktype, IOObject io_object, IOContext io_context, IOOp io_op)
void pgstat_io_snapshot_cb(void)
const char * pgstat_get_io_context_name(IOContext io_context)
void pgstat_io_init_shmem_cb(void *stats)
bool pgstat_tracks_io_object(BackendType bktype, IOObject io_object, IOContext io_context)
void pgstat_count_io_op_n(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt)
void pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op)
instr_time local_blk_read_time
instr_time shared_blk_read_time
instr_time shared_blk_write_time
instr_time local_blk_write_time
LWLock locks[BACKEND_NUM_TYPES]
PgStat_Counter times[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
PgStat_Counter counts[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
PgStat_BktypeIO stats[BACKEND_NUM_TYPES]
TimestampTz stat_reset_timestamp
PgStat_ShmemControl * shmem
PgStat_Counter counts[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
instr_time pending_times[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]