Re: Inconsistency in reporting checkpointer stats
От | Fujii Masao |
---|---|
Тема | Re: Inconsistency in reporting checkpointer stats |
Дата | |
Msg-id | 68c00653-9f21-42d4-9a0f-617fd92254a9@oss.nttdata.com обсуждение исходный текст |
Ответ на | Inconsistency in reporting checkpointer stats (Nitin Jadhav <nitinjadhavpostgres@gmail.com>) |
Список | pgsql-hackers |
On 2024/09/22 20:44, Nitin Jadhav wrote: >> + CheckpointStats.ckpt_slru_written, >> + (double) CheckpointStats.ckpt_slru_written * 100 / NBuffers, >> >> I don't think NBuffers represents the maximum number of SLRU buffers. >> We might need to calculate this based on specific GUC settings, >> like transaction_buffers. > > Great observation. Since the SLRU buffers written during a checkpoint > can include transaction_buffers, commit_timestamp_buffers, > subtransaction_buffers, multixact_member_buffers, > multixact_offset_buffers, and serializable_buffers, the total count of > SLRU buffers should be the sum of all these types. We might need to > introduce a global variable, such as total_slru_count, in the > globals.c file to hold this sum. The num_slots variable in the > SlruSharedData structure needs to be accessed from all types of SLRU > and stored in total_slru_count. This can then be used during logging > to calculate the percentage of SLRU buffers written. However, I’m > unsure if this effort is justified. While it makes sense for normal > buffers to display the percentage, the additional code required might > not provide significant value to users. Therefore, I have removed this > in the attached v6 patch. +1 Thanks for updating the patch! It looks good to me. Barring any objections, I will commit this patch. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: