Re: wal stats questions
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Masahiro Ikeda <ikedamsh@oss.nttdata.com>,
torikoshia <torikoshia@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org, andres@anarazel.de,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: 2021-04-22T13:42:14Z
Lists: pgsql-hackers
On 2021/04/21 18:31, Masahiro Ikeda wrote: >> BTW, is it better to change PgStat_Counter from int64 to uint64 because> there aren't any counters with negative number? On second thought, it's ok even if the counters like wal_records get overflowed. Because they are always used to calculate the diff between the previous and current counters. Even when the current counters are overflowed and the previous ones are not, WalUsageAccumDiff() seems to return the right diff of them. If this understanding is right, I'd withdraw my comment and it's ok to use "long" type for those counters. Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
Fix issues in pg_stat_wal.
- d8735b8b4651 14.0 landed
-
Change data type of counters in BufferUsage and WalUsage from long to int64.
- d780d7c0882f 14.0 landed