mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 22:49:41 +03:00 
			
		
		
		
	Improve comment on top of pgstat_count_io_op_time()
This commit adds more documentation to pgstat_count_io_op_time() in pgstat_io.c, explaining its internals for pgstat_count_buffer_*(), pgBufferUsage and the contexts where these are used. Extracted from a larger patch by the same author. Author: Nazir Bilal Yavuz Discussion: https://postgr.es/m/CAN55FZ3AiQ+ZMxUuXnBpd0Rrh1YhwJ5FudkHg=JU0P+-W8T4Vg@mail.gmail.com
This commit is contained in:
		| @@ -107,6 +107,14 @@ pgstat_prepare_io_time(bool track_io_guc) | |||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Like pgstat_count_io_op() except it also accumulates time. |  * Like pgstat_count_io_op() except it also accumulates time. | ||||||
|  |  * | ||||||
|  |  * The calls related to pgstat_count_buffer_*() are for pgstat_database.  As | ||||||
|  |  * pg_stat_database only counts block read and write times, these are done for | ||||||
|  |  * IOOP_READ, IOOP_WRITE and IOOP_EXTEND. | ||||||
|  |  * | ||||||
|  |  * pgBufferUsage is used for EXPLAIN.  pgBufferUsage has write and read stats | ||||||
|  |  * for shared, local and temporary blocks.  pg_stat_io does not track the | ||||||
|  |  * activity of temporary blocks, so these are ignored here. | ||||||
|  */ |  */ | ||||||
| void | void | ||||||
| pgstat_count_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op, | pgstat_count_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user