postgresql/src/backend/storage
Andres Freund ca7b3c4c00 pg_stat_wal: Accumulate time as instr_time instead of microseconds
In instr_time.h it is stated that:

* When summing multiple measurements, it's recommended to leave the
* running sum in instr_time form (ie, use INSTR_TIME_ADD or
* INSTR_TIME_ACCUM_DIFF) and convert to a result format only at the end.

The reason for that is that converting to microseconds is not cheap, and can
loose precision.  Therefore this commit changes 'PendingWalStats' to use
'instr_time' instead of 'PgStat_Counter' while accumulating 'wal_write_time'
and 'wal_sync_time'.

Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/1feedb83-7aa9-cb4b-5086-598349d3f555@gmail.com
2023-03-30 14:23:14 -07:00
..
buffer bufmgr: Fix undefined behaviour with, unrealistically, large temp_buffers 2023-03-30 10:26:10 -07:00
file pg_stat_wal: Accumulate time as instr_time instead of microseconds 2023-03-30 14:23:14 -07:00
freespace Update copyright for 2023 2023-01-02 15:00:37 -05:00
ipc Fix incorrect format placeholders 2023-03-30 08:33:43 +02:00
large_object Update copyright for 2023 2023-01-02 15:00:37 -05:00
lmgr Fix race in SERIALIZABLE READ ONLY. 2023-03-09 16:33:24 +13:00
page Update copyright for 2023 2023-01-02 15:00:37 -05:00
smgr Update types in smgr API 2023-02-27 07:47:46 +01:00
sync Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00