diff options
Diffstat (limited to 'src/include/executor/instrument.h')
-rw-r--r-- | src/include/executor/instrument.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index fc87eed4fb2..2f9905b7c8e 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -16,6 +16,11 @@ #include "portability/instr_time.h" +/* + * BufferUsage and WalUsage counters keep being incremented infinitely, + * i.e., must never be reset to zero, so that we can calculate how much + * the counters are incremented in an arbitrary period. + */ typedef struct BufferUsage { int64 shared_blks_hit; /* # of shared buffer hits */ @@ -32,6 +37,13 @@ typedef struct BufferUsage instr_time blk_write_time; /* time spent writing */ } BufferUsage; +/* + * WalUsage tracks only WAL activity like WAL records generation that + * can be measured per query and is displayed by EXPLAIN command, + * pg_stat_statements extension, etc. It does not track other WAL activity + * like WAL writes that it's not worth measuring per query. That's tracked + * by WAL global statistics counters in WalStats, instead. + */ typedef struct WalUsage { int64 wal_records; /* # of WAL records produced */ |