On Fri, Feb 13, 2026 at 10:47 AM Michael Paquier <[email protected]> wrote: > > On Tue, Feb 10, 2026 at 09:10:45PM +0530, Ashutosh Bapat wrote: > > It might be better to just use the phrase "This number ..." since the > > earlier sentence mentions it as "number". I have made that change in > > my repository. Will send it with the next version of patchset. > > I have studied this thread, and can get behind the idea of adding the > number of bytes sent to the output plugin at this level. > > However, I think that patch 0001 should be split into two parts, > because it is doing two separate things, not one: > - One patch for the rename of the existing fields total_txns and > total_bytes to respectively total_wal_txns and total_wal_bytes, so as > it becomes possible to make the distinction between the stats data > coming from WAL. (The suggested rename was a bit confusing for me > first, FWIW, when I read total_wal_bytes, my mind understood that as a > total number of WAL generated, even if I get that that it comes from > an amount of WAL data processed when decoding transactions. Not an > objection, just a feeling). > - A second patch to introduce the new field for the number of bytes > sent to the output plugin. >
I am open to other suggestions. Since the bytes in total_bytes and sent_bytes refer to different set of bytes, it was thought to be better to rename total_bytes and hence total_txns. But then stream_bytes, spill_bytes too come from WAL and they are not renamed right now. So there's already some awkwardness. I also see that wal in the name can be confusing. I thought of using "reordered" instead of "wal" but reorder buffer is an internal concept. If we change the reorder buffer mechanism tomorrow, we will need to change the name of the field. So we discarded that. I am wondering whether we should just leave the name as is and rely on documentation to clarify the difference. What do you think? Although renaming is a separate change, it's closely related with the new field. Committing that separately won't be any value addition. As is, the fields in the view are quite clear from their names. So it's not clear why we need separate patch for it. If you insist, I will create a separate patch. > I am also questioning why you did not make the choice of renaming > totalBytes and totalTxns in ReorderBuffer. On consistency ground, at > least, that seems relevant to me as these two numbers are the source > data fed to pgstats. No particular reason. In the code it's quite clear what totalBytes means, so I didn't feel like renaming. But I think it's better to be consistent and rename the internal variables as well, if we decide to rename those fields. -- Best Wishes, Ashutosh Bapat
