Re: Show WAL write and fsync stats in pg_stat_io
От | Bertrand Drouvot |
---|---|
Тема | Re: Show WAL write and fsync stats in pg_stat_io |
Дата | |
Msg-id | Z5o9OQ0nwWD9tKTR@ip-10-97-1-34.eu-west-3.compute.internal обсуждение исходный текст |
Ответ на | Re: Show WAL write and fsync stats in pg_stat_io (Nazir Bilal Yavuz <byavuz81@gmail.com>) |
Список | pgsql-hackers |
Hi, On Wed, Jan 29, 2025 at 01:49:20PM +0300, Nazir Bilal Yavuz wrote: > Sorry for replying late. No problem at all! > It turns out that the difference is expected. > It is because pg_stat_wal.wal_bytes tracks the total amount of WAL > generated, while pg_stat_io tracks the I/Os that are written to disk. Yeah, I do agree it's expected: Indeed pg_stat_wal.wal_bytes somehow "focus" on the wal records size while the pg_stat_io's unit is the wal_block_size. That makes sense and "only" affects the "bytes" (the remaining common fields looks consistent across the 2 views). > It is explicitly said that pg_stat_io tracks I/O operations and > pg_stat_wal.wal_bytes tracks total amount of WAL generated in bytes. I > think this is clear enough. Do you think we still need additional > explanation? I think that would not hurt to add a comment mentioning that the "bytes" are expected to differ given the fact that the IO unit is the wal_block_size. But, that said, I don't have a strong opinion on it, just a nice to have IMHO. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: