diff options
| author | Andres Freund <andres@anarazel.de> | 2023-02-09 22:22:26 -0800 |
|---|---|---|
| committer | Andres Freund <andres@anarazel.de> | 2023-02-09 22:22:26 -0800 |
| commit | f30d62c2fc60acfa62d3b83a73dc9bf7f83cfe2f (patch) | |
| tree | c66e2b3bb3f0fb8c76c6e185fcba9e8e985fde83 /src/include/storage/bufmgr.h | |
| parent | 40d0b2d4153d903d41adee6a303428540389191b (diff) | |
pgstat: Track more detailed relation IO statistics
Commit 28e626bde00 introduced the infrastructure for tracking more detailed IO
statistics. This commit adds the actual collection of the new IO statistics
for relations and temporary relations. See aforementioned commit for goals and
high-level design.
The changes in this commit are fairly straight-forward. The bulk of the change
is to passing sufficient information to the callsites of pgstat_count_io_op().
A somewhat unsightly detail is that it currently is hard to find a better
place to count fsyncs than in md.c, whereas the other pgstat_count_io_op()
calls are in bufmgr.c/localbuf.c. As the number of fsyncs is tied to md.c
implementation details, it's not obvious there is a better answer.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20200124195226.lth52iydq2n2uilq@alap3.anarazel.de
Diffstat (limited to 'src/include/storage/bufmgr.h')
| -rw-r--r-- | src/include/storage/bufmgr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 33eadbc1291..b8a18b8081f 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -23,7 +23,12 @@ typedef void *Block; -/* Possible arguments for GetAccessStrategy() */ +/* + * Possible arguments for GetAccessStrategy(). + * + * If adding a new BufferAccessStrategyType, also add a new IOContext so + * IO statistics using this strategy are tracked. + */ typedef enum BufferAccessStrategyType { BAS_NORMAL, /* Normal random access */ |
