diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/executor/instrument.h | 12 | ||||
-rw-r--r-- | src/include/pgstat.h | 3 |
2 files changed, 13 insertions, 2 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 */ diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 5fbd3a05ba1..9612c0a6c27 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -1091,8 +1091,7 @@ extern void pgstat_twophase_postabort(TransactionId xid, uint16 info, extern void pgstat_send_archiver(const char *xlog, bool failed); extern void pgstat_send_bgwriter(void); -extern void pgstat_report_wal(void); -extern bool pgstat_send_wal(bool force); +extern void pgstat_send_wal(bool force); /* ---------- * Support functions for the SQL-callable functions to |