> Presumably we could make this consistent either by counting SLRU > writes in both places, or by counting them in neither place. This > proposal would count them in both places. But why is that the right > thing to do? > > I'm somewhat inclined to think that we should use "buffers" to mean > regular data buffers, and if SLRU buffers also need to be counted, we > ought to make that a separate counter. Or just leave it out > altogether. > > This is arguable, though, for sure....
Thanks Robert for sharing your thoughts. My first thought was to just remove counting SLRU buffers, then after some more analysis, I found that the checkpointer is responsible for including both regular data buffers and SLRU buffers. Please refer to dee663f7843902535a15ae366cede8b4089f1144 commit for more information. The part of the commit message is included here [1] for quick reference. Hence I concluded to keep the information and added an increment to count SLRU buffers. I am not in favour of making this as a separate counter as this can be treated as little low level information and it just adds up in the stats. Please share your thoughts. [1]: Hoist ProcessSyncRequests() up into CheckPointGuts() to make it clearer that it applies to all the SLRU mini-buffer-pools as well as the main buffer pool. Rearrange things so that data collected in CheckpointStats includes SLRU activity. Thanks & Regards, Nitin Jadhav On Tue, Dec 20, 2022 at 2:38 AM Robert Haas <robertmh...@gmail.com> wrote: > > On Wed, Dec 14, 2022 at 2:32 AM Nitin Jadhav > <nitinjadhavpostg...@gmail.com> wrote: > > In order to fix this, the > > PendingCheckpointerStats.buf_written_checkpoints should be incremented > > in SlruInternalWritePage() similar to > > CheckpointStats.ckpt_bufs_written. I have attached the patch for the > > same. Please share your thoughts. > > Presumably we could make this consistent either by counting SLRU > writes in both places, or by counting them in neither place. This > proposal would count them in both places. But why is that the right > thing to do? > > I'm somewhat inclined to think that we should use "buffers" to mean > regular data buffers, and if SLRU buffers also need to be counted, we > ought to make that a separate counter. Or just leave it out > altogether. > > This is arguable, though, for sure.... > > -- > Robert Haas > EDB: http://www.enterprisedb.com