summaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorMichael Paquier2023-12-16 19:16:20 +0000
committerMichael Paquier2023-12-16 19:16:20 +0000
commit3c9d9acae0bc0cd2f905043cb1d581baec4622c4 (patch)
treeb5dd28cef30e14e3c88c2ba2e233784f42d84e10 /src/include/pgstat.h
parenta6be0600ac3b71dda8277ab0fcbe59ee101ac1ce (diff)
Refactor pgstat_prepare_io_time() with an input argument instead of a GUC
Originally, this routine relied on track_io_timing to check if a time interval for an I/O operation stored in pg_stat_io should be initialized or not. However, the addition of WAL statistics to pg_stat_io requires that the initialization happens when track_wal_io_timing is enabled, which is dependent on the code path where the I/O operation happens. Author: Nazir Bilal Yavuz Discussion: https://postgr.es/m/CAN55FZ3AiQ+ZMxUuXnBpd0Rrh1YhwJ5FudkHg=JU0P+-W8T4Vg@mail.gmail.com
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index f95d8db0c4c..fc93d0d731d 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -519,7 +519,7 @@ extern bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io,
BackendType bktype);
extern void pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op);
extern void pgstat_count_io_op_n(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt);
-extern instr_time pgstat_prepare_io_time(void);
+extern instr_time pgstat_prepare_io_time(bool track_io_guc);
extern void pgstat_count_io_op_time(IOObject io_object, IOContext io_context,
IOOp io_op, instr_time start_time, uint32 cnt);