Re: Report bytes and transactions actually sent downtream
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-09-24T06:42:04Z
Lists: pgsql-hackers
Hi, On Wed, Sep 24, 2025 at 11:38:30AM +0530, shveta malik wrote: > On Wed, Sep 24, 2025 at 11:08 AM Ashutosh Bapat > <ashutosh.bapat.oss@gmail.com> wrote: > > > > In WalSndWriteData() we can't rely on what happens in a low level API > > like socket_putmessage(). And we are counting the number of bytes in > > the logically decoded message. So, I actually wonder whether we should > > count 1 byte of 'd' in sentBytes. Shveta, Bertand, what do you think? > > > > If we are not counting all such metadata bytes ((or can't reliably do > so), then IMO, we shall skip counting msgtype as well. Agree. Maybe mention in the doc that metadata (including msgtype) bytes are not taken into account? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com