PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pgstat_io.c File Reference
#include "postgres.h"
#include "executor/instrument.h"
#include "storage/bufmgr.h"
#include "utils/pgstat_internal.h"
Include dependency graph for pgstat_io.c:

Go to the source code of this file.

Functions

bool pgstat_bktype_io_stats_valid (PgStat_BktypeIO *backend_io, BackendType bktype)
 
void pgstat_count_io_op (IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt, uint64 bytes)
 
instr_time pgstat_prepare_io_time (bool track_io_guc)
 
void pgstat_count_io_op_time (IOObject io_object, IOContext io_context, IOOp io_op, instr_time start_time, uint32 cnt, uint64 bytes)
 
PgStat_IOpgstat_fetch_stat_io (void)
 
void pgstat_flush_io (bool nowait)
 
bool pgstat_io_flush_cb (bool nowait)
 
const charpgstat_get_io_context_name (IOContext io_context)
 
const charpgstat_get_io_object_name (IOObject io_object)
 
void pgstat_io_init_shmem_cb (void *stats)
 
void pgstat_io_reset_all_cb (TimestampTz ts)
 
void pgstat_io_snapshot_cb (void)
 
bool pgstat_tracks_io_bktype (BackendType bktype)
 
bool pgstat_tracks_io_object (BackendType bktype, IOObject io_object, IOContext io_context)
 
bool pgstat_tracks_io_op (BackendType bktype, IOObject io_object, IOContext io_context, IOOp io_op)
 

Variables

static PgStat_PendingIO PendingIOStats
 
static bool have_iostats = false
 

Function Documentation

◆ pgstat_bktype_io_stats_valid()

bool pgstat_bktype_io_stats_valid ( PgStat_BktypeIO backend_io,
BackendType  bktype 
)

Definition at line 37 of file pgstat_io.c.

39{
41 {
43 {
44 for (int io_op = 0; io_op < IOOP_NUM_TYPES; io_op++)
45 {
46 /* we do track it */
48 {
49 /* ensure that if IO times are non-zero, counts are > 0 */
50 if (backend_io->times[io_object][io_context][io_op] != 0 &&
51 backend_io->counts[io_object][io_context][io_op] <= 0)
52 return false;
53
54 continue;
55 }
56
57 /* we don't track it, and it is not 0 */
58 if (backend_io->counts[io_object][io_context][io_op] != 0)
59 return false;
60 }
61 }
62 }
63
64 return true;
65}
#define IOOP_NUM_TYPES
Definition pgstat.h:319
#define IOCONTEXT_NUM_TYPES
Definition pgstat.h:293
#define IOOBJECT_NUM_TYPES
Definition pgstat.h:282
bool pgstat_tracks_io_op(BackendType bktype, IOObject io_object, IOContext io_context, IOOp io_op)
Definition pgstat_io.c:477
static int fb(int x)

References fb(), IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, IOOP_NUM_TYPES, and pgstat_tracks_io_op().

Referenced by pg_stat_get_backend_io(), pg_stat_get_io(), and pgstat_io_flush_cb().

◆ pgstat_count_io_op()

void pgstat_count_io_op ( IOObject  io_object,
IOContext  io_context,
IOOp  io_op,
uint32  cnt,
uint64  bytes 
)

Definition at line 68 of file pgstat_io.c.

70{
71 Assert((unsigned int) io_object < IOOBJECT_NUM_TYPES);
72 Assert((unsigned int) io_context < IOCONTEXT_NUM_TYPES);
75
78
79 /* Add the per-backend counts */
81
82 have_iostats = true;
84}
#define Assert(condition)
Definition c.h:873
BackendType MyBackendType
Definition miscinit.c:64
bool pgstat_report_fixed
Definition pgstat.c:218
#define pgstat_is_ioop_tracked_in_bytes(io_op)
Definition pgstat.h:321
void pgstat_count_backend_io_op(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt, uint64 bytes)
static PgStat_PendingIO PendingIOStats
Definition pgstat_io.c:23
static bool have_iostats
Definition pgstat_io.c:24
PgStat_Counter counts[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
Definition pgstat.h:335
uint64 bytes[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
Definition pgstat.h:334

References Assert, PgStat_PendingIO::bytes, PgStat_PendingIO::counts, fb(), have_iostats, IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, MyBackendType, PendingIOStats, pgstat_count_backend_io_op(), pgstat_is_ioop_tracked_in_bytes, pgstat_report_fixed, and pgstat_tracks_io_op().

Referenced by AsyncReadBuffers(), GetLocalVictimBuffer(), GetVictimBuffer(), pgstat_count_io_op_time(), and PinBufferForBlock().

◆ pgstat_count_io_op_time()

void pgstat_count_io_op_time ( IOObject  io_object,
IOContext  io_context,
IOOp  io_op,
instr_time  start_time,
uint32  cnt,
uint64  bytes 
)

Definition at line 122 of file pgstat_io.c.

124{
126 {
128
131
132 if (io_object != IOOBJECT_WAL)
133 {
134 if (io_op == IOOP_WRITE || io_op == IOOP_EXTEND)
135 {
141 }
142 else if (io_op == IOOP_READ)
143 {
149 }
150 }
151
153 io_time);
154
155 /* Add the per-backend count */
157 io_time);
158 }
159
161}
#define INSTR_TIME_SET_CURRENT(t)
Definition instr_time.h:122
#define INSTR_TIME_ADD(x, y)
Definition instr_time.h:178
#define INSTR_TIME_IS_ZERO(t)
Definition instr_time.h:169
#define INSTR_TIME_SUBTRACT(x, y)
Definition instr_time.h:181
#define INSTR_TIME_GET_MICROSEC(t)
Definition instr_time.h:196
BufferUsage pgBufferUsage
Definition instrument.c:20
static time_t start_time
Definition pg_ctl.c:96
#define pgstat_count_buffer_read_time(n)
Definition pgstat.h:631
@ IOOBJECT_RELATION
Definition pgstat.h:277
@ IOOBJECT_WAL
Definition pgstat.h:279
@ IOOBJECT_TEMP_RELATION
Definition pgstat.h:278
#define pgstat_count_buffer_write_time(n)
Definition pgstat.h:633
@ IOOP_EXTEND
Definition pgstat.h:314
@ IOOP_READ
Definition pgstat.h:315
@ IOOP_WRITE
Definition pgstat.h:316
void pgstat_count_backend_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op, instr_time io_time)
void pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt, uint64 bytes)
Definition pgstat_io.c:68
instr_time local_blk_read_time
Definition instrument.h:38
instr_time shared_blk_read_time
Definition instrument.h:36
instr_time shared_blk_write_time
Definition instrument.h:37
instr_time local_blk_write_time
Definition instrument.h:39
instr_time pending_times[IOOBJECT_NUM_TYPES][IOCONTEXT_NUM_TYPES][IOOP_NUM_TYPES]
Definition pgstat.h:336

References fb(), INSTR_TIME_ADD, INSTR_TIME_GET_MICROSEC, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, IOOBJECT_RELATION, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, IOOP_EXTEND, IOOP_READ, IOOP_WRITE, BufferUsage::local_blk_read_time, BufferUsage::local_blk_write_time, PgStat_PendingIO::pending_times, PendingIOStats, pgBufferUsage, pgstat_count_backend_io_op_time(), pgstat_count_buffer_read_time, pgstat_count_buffer_write_time, pgstat_count_io_op(), BufferUsage::shared_blk_read_time, BufferUsage::shared_blk_write_time, and start_time.

Referenced by AsyncReadBuffers(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushLocalBuffer(), issue_xlog_fsync(), IssuePendingWritebacks(), mdsyncfiletag(), register_dirty_segment(), WaitReadBuffers(), WALRead(), XLogFileInitInternal(), XLogPageRead(), XLogWalRcvWrite(), and XLogWrite().

◆ pgstat_fetch_stat_io()

PgStat_IO * pgstat_fetch_stat_io ( void  )

Definition at line 164 of file pgstat_io.c.

165{
167
168 return &pgStatLocal.snapshot.io;
169}
void pgstat_snapshot_fixed(PgStat_Kind kind)
Definition pgstat.c:1070
PgStat_LocalState pgStatLocal
Definition pgstat.c:212
#define PGSTAT_KIND_IO
Definition pgstat_kind.h:38
PgStat_Snapshot snapshot

References PgStat_Snapshot::io, PGSTAT_KIND_IO, pgstat_snapshot_fixed(), pgStatLocal, and PgStat_LocalState::snapshot.

Referenced by pg_stat_get_io().

◆ pgstat_flush_io()

void pgstat_flush_io ( bool  nowait)

◆ pgstat_get_io_context_name()

const char * pgstat_get_io_context_name ( IOContext  io_context)

Definition at line 240 of file pgstat_io.c.

241{
242 switch (io_context)
243 {
245 return "bulkread";
247 return "bulkwrite";
248 case IOCONTEXT_INIT:
249 return "init";
250 case IOCONTEXT_NORMAL:
251 return "normal";
252 case IOCONTEXT_VACUUM:
253 return "vacuum";
254 }
255
256 elog(ERROR, "unrecognized IOContext value: %d", io_context);
258}
#define pg_unreachable()
Definition c.h:341
#define ERROR
Definition elog.h:39
#define elog(elevel,...)
Definition elog.h:226
@ IOCONTEXT_INIT
Definition pgstat.h:288
@ IOCONTEXT_NORMAL
Definition pgstat.h:289
@ IOCONTEXT_VACUUM
Definition pgstat.h:290
@ IOCONTEXT_BULKREAD
Definition pgstat.h:286
@ IOCONTEXT_BULKWRITE
Definition pgstat.h:287

References elog, ERROR, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, and pg_unreachable.

Referenced by pg_stat_io_build_tuples().

◆ pgstat_get_io_object_name()

const char * pgstat_get_io_object_name ( IOObject  io_object)

Definition at line 261 of file pgstat_io.c.

262{
263 switch (io_object)
264 {
266 return "relation";
268 return "temp relation";
269 case IOOBJECT_WAL:
270 return "wal";
271 }
272
273 elog(ERROR, "unrecognized IOObject value: %d", io_object);
275}

References elog, ERROR, fb(), IOOBJECT_RELATION, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, and pg_unreachable.

Referenced by pg_stat_io_build_tuples().

◆ pgstat_io_flush_cb()

bool pgstat_io_flush_cb ( bool  nowait)

Definition at line 189 of file pgstat_io.c.

190{
193
194 if (!have_iostats)
195 return false;
196
200
201 if (!nowait)
204 return true;
205
207 {
209 {
210 for (int io_op = 0; io_op < IOOP_NUM_TYPES; io_op++)
211 {
212 instr_time time;
213
216
219
221
224 }
225 }
226 }
227
229
231
233
234 have_iostats = false;
235
236 return false;
237}
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
Definition lwlock.c:1176
void LWLockRelease(LWLock *lock)
Definition lwlock.c:1793
bool LWLockConditionalAcquire(LWLock *lock, LWLockMode mode)
Definition lwlock.c:1347
@ LW_EXCLUSIVE
Definition lwlock.h:112
bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io, BackendType bktype)
Definition pgstat_io.c:37
LWLock locks[BACKEND_NUM_TYPES]
PgStat_BktypeIO stats[BACKEND_NUM_TYPES]
Definition pgstat.h:342
PgStat_ShmemControl * shmem

References Assert, PgStat_PendingIO::bytes, PgStat_PendingIO::counts, fb(), 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, and PgStatShared_IO::stats.

Referenced by pgstat_flush_io().

◆ pgstat_io_init_shmem_cb()

void pgstat_io_init_shmem_cb ( void stats)

Definition at line 278 of file pgstat_io.c.

279{
281
282 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
284}
int i
Definition isn.c:77
void LWLockInitialize(LWLock *lock, int tranche_id)
Definition lwlock.c:698
#define BACKEND_NUM_TYPES
Definition miscadmin.h:377

References BACKEND_NUM_TYPES, fb(), i, and LWLockInitialize().

◆ pgstat_io_reset_all_cb()

void pgstat_io_reset_all_cb ( TimestampTz  ts)

Definition at line 287 of file pgstat_io.c.

288{
289 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
290 {
293
295
296 /*
297 * Use the lock in the first BackendType's PgStat_BktypeIO to protect
298 * the reset timestamp as well.
299 */
300 if (i == 0)
302
305 }
306}
TimestampTz stat_reset_timestamp
Definition pgstat.h:341

References BACKEND_NUM_TYPES, fb(), 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.

◆ pgstat_io_snapshot_cb()

void pgstat_io_snapshot_cb ( void  )

Definition at line 309 of file pgstat_io.c.

310{
311 for (int i = 0; i < BACKEND_NUM_TYPES; i++)
312 {
316
318
319 /*
320 * Use the lock in the first BackendType's PgStat_BktypeIO to protect
321 * the reset timestamp as well.
322 */
323 if (i == 0)
326
327 /* using struct assignment due to better type safety */
330 }
331}
@ LW_SHARED
Definition lwlock.h:113

References BACKEND_NUM_TYPES, fb(), 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.

◆ pgstat_prepare_io_time()

instr_time pgstat_prepare_io_time ( bool  track_io_guc)

Definition at line 91 of file pgstat_io.c.

92{
94
95 if (track_io_guc)
97 else
98 {
99 /*
100 * There is no need to set io_start when an IO timing GUC is disabled.
101 * Initialize it to zero to avoid compiler warnings and to let
102 * pgstat_count_io_op_time() know that timings should be ignored.
103 */
105 }
106
107 return io_start;
108}
#define INSTR_TIME_SET_ZERO(t)
Definition instr_time.h:172

References fb(), INSTR_TIME_SET_CURRENT, and INSTR_TIME_SET_ZERO.

Referenced by AsyncReadBuffers(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushLocalBuffer(), issue_xlog_fsync(), IssuePendingWritebacks(), mdsyncfiletag(), register_dirty_segment(), WaitReadBuffers(), WALRead(), XLogFileInitInternal(), XLogPageRead(), XLogWalRcvWrite(), and XLogWrite().

◆ pgstat_tracks_io_bktype()

bool pgstat_tracks_io_bktype ( BackendType  bktype)

Definition at line 351 of file pgstat_io.c.

352{
353 /*
354 * List every type so that new backend types trigger a warning about
355 * needing to adjust this switch.
356 */
357 switch (bktype)
358 {
359 case B_INVALID:
361 case B_ARCHIVER:
362 case B_LOGGER:
363 return false;
364
366 case B_AUTOVAC_WORKER:
367 case B_BACKEND:
368 case B_BG_WORKER:
369 case B_BG_WRITER:
370 case B_CHECKPOINTER:
371 case B_IO_WORKER:
374 case B_STARTUP:
375 case B_WAL_RECEIVER:
376 case B_WAL_SENDER:
377 case B_WAL_SUMMARIZER:
378 case B_WAL_WRITER:
379 return true;
380 }
381
382 return false;
383}
@ B_WAL_SUMMARIZER
Definition miscadmin.h:367
@ B_WAL_WRITER
Definition miscadmin.h:368
@ B_WAL_RECEIVER
Definition miscadmin.h:366
@ B_CHECKPOINTER
Definition miscadmin.h:363
@ B_WAL_SENDER
Definition miscadmin.h:347
@ B_IO_WORKER
Definition miscadmin.h:364
@ B_LOGGER
Definition miscadmin.h:374
@ B_STARTUP
Definition miscadmin.h:365
@ B_BG_WORKER
Definition miscadmin.h:346
@ B_INVALID
Definition miscadmin.h:339
@ B_STANDALONE_BACKEND
Definition miscadmin.h:350
@ B_BG_WRITER
Definition miscadmin.h:362
@ B_BACKEND
Definition miscadmin.h:342
@ B_ARCHIVER
Definition miscadmin.h:361
@ B_AUTOVAC_LAUNCHER
Definition miscadmin.h:344
@ B_SLOTSYNC_WORKER
Definition miscadmin.h:348
@ B_DEAD_END_BACKEND
Definition miscadmin.h:343
@ B_AUTOVAC_WORKER
Definition miscadmin.h:345

References B_ARCHIVER, B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BACKEND, B_BG_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_DEAD_END_BACKEND, B_INVALID, B_IO_WORKER, B_LOGGER, B_SLOTSYNC_WORKER, B_STANDALONE_BACKEND, B_STARTUP, B_WAL_RECEIVER, B_WAL_SENDER, B_WAL_SUMMARIZER, B_WAL_WRITER, and fb().

Referenced by pg_stat_get_io(), and pgstat_tracks_io_object().

◆ pgstat_tracks_io_object()

bool pgstat_tracks_io_object ( BackendType  bktype,
IOObject  io_object,
IOContext  io_context 
)

Definition at line 393 of file pgstat_io.c.

395{
396 bool no_temp_rel;
397
398 /*
399 * Some BackendTypes should never track IO statistics.
400 */
402 return false;
403
404 /*
405 * Currently, IO on IOOBJECT_WAL objects can only occur in the
406 * IOCONTEXT_NORMAL and IOCONTEXT_INIT IOContexts.
407 */
408 if (io_object == IOOBJECT_WAL &&
411 return false;
412
413 /*
414 * Currently, IO on temporary relations can only occur in the
415 * IOCONTEXT_NORMAL IOContext.
416 */
419 return false;
420
421 /*
422 * In core Postgres, only regular backends and WAL Sender processes
423 * executing queries will use local buffers and operate on temporary
424 * relations. Parallel workers will not use local buffers (see
425 * InitLocalBuffers()); however, extensions leveraging background workers
426 * have no such limitation, so track IO on IOOBJECT_TEMP_RELATION for
427 * BackendType B_BG_WORKER.
428 */
434
437 return false;
438
439 /*
440 * Some BackendTypes only perform IO under IOOBJECT_WAL, hence exclude all
441 * rows for all the other objects for these.
442 */
445 return false;
446
447 /*
448 * Some BackendTypes do not currently perform any IO in certain
449 * IOContexts, and, while it may not be inherently incorrect for them to
450 * do so, excluding those rows from the view makes the view easier to use.
451 */
452 if ((bktype == B_CHECKPOINTER || bktype == B_BG_WRITER) &&
456 return false;
457
459 return false;
460
463 return false;
464
465 return true;
466}
bool pgstat_tracks_io_bktype(BackendType bktype)
Definition pgstat_io.c:351

References B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_STANDALONE_BACKEND, B_STARTUP, B_WAL_RECEIVER, B_WAL_SUMMARIZER, B_WAL_WRITER, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, and pgstat_tracks_io_bktype().

Referenced by pg_stat_io_build_tuples(), and pgstat_tracks_io_op().

◆ pgstat_tracks_io_op()

bool pgstat_tracks_io_op ( BackendType  bktype,
IOObject  io_object,
IOContext  io_context,
IOOp  io_op 
)

Definition at line 477 of file pgstat_io.c.

479{
481
482 /* if (io_context, io_object) will never collect stats, we're done */
484 return false;
485
486 /*
487 * Some BackendTypes will not do certain IOOps.
488 */
489 if (bktype == B_BG_WRITER &&
490 (io_op == IOOP_READ || io_op == IOOP_EVICT || io_op == IOOP_HIT))
491 return false;
492
493 if (bktype == B_CHECKPOINTER &&
495 (io_op == IOOP_EVICT || io_op == IOOP_HIT)))
496 return false;
497
500 return false;
501
502 /*
503 * Some BackendTypes do not perform reads with IOOBJECT_WAL.
504 */
505 if (io_object == IOOBJECT_WAL && io_op == IOOP_READ &&
509 return false;
510
511 /*
512 * Temporary tables are not logged and thus do not require fsync'ing.
513 * Writeback is not requested for temporary tables.
514 */
517 return false;
518
519 /*
520 * Some IOOps are not valid in certain IOContexts and some IOOps are only
521 * valid in certain contexts.
522 */
524 return false;
525
528
529 /*
530 * IOOP_REUSE is only relevant when a BufferAccessStrategy is in use.
531 */
533 return false;
534
535 /*
536 * IOOBJECT_WAL IOObject will not do certain IOOps depending on IOContext.
537 */
539 !(io_op == IOOP_WRITE || io_op == IOOP_FSYNC))
540 return false;
541
544 return false;
545
546 /*
547 * IOOP_FSYNC IOOps done by a backend using a BufferAccessStrategy are
548 * counted in the IOCONTEXT_NORMAL IOContext. See comment in
549 * register_dirty_segment() for more details.
550 */
552 return false;
553
554
555 return true;
556}
@ IOOP_FSYNC
Definition pgstat.h:308
@ IOOP_WRITEBACK
Definition pgstat.h:311
@ IOOP_HIT
Definition pgstat.h:309
@ IOOP_EVICT
Definition pgstat.h:307
@ IOOP_REUSE
Definition pgstat.h:310
bool pgstat_tracks_io_object(BackendType bktype, IOObject io_object, IOContext io_context)
Definition pgstat_io.c:393

References B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_WAL_RECEIVER, B_WAL_WRITER, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, IOOP_EVICT, IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, IOOP_READ, IOOP_REUSE, IOOP_WRITE, IOOP_WRITEBACK, and pgstat_tracks_io_object().

Referenced by pg_stat_io_build_tuples(), pgstat_bktype_io_stats_valid(), pgstat_count_backend_io_op(), pgstat_count_backend_io_op_time(), and pgstat_count_io_op().

Variable Documentation

◆ have_iostats

bool have_iostats = false
static

Definition at line 24 of file pgstat_io.c.

Referenced by pgstat_count_io_op(), and pgstat_io_flush_cb().

◆ PendingIOStats

PgStat_PendingIO PendingIOStats
static

Definition at line 23 of file pgstat_io.c.

Referenced by pgstat_count_io_op(), pgstat_count_io_op_time(), and pgstat_io_flush_cb().