Re: Report bytes and transactions actually sent downtream - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Report bytes and transactions actually sent downtream
Date
Msg-id aNOSvFWplHTeHGd2@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Report bytes and transactions actually sent downtream  (shveta malik <shveta.malik@gmail.com>)
Responses Re: Report bytes and transactions actually sent downtream
List 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



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: SQL:2023 JSON simplified accessor support
Next
From: John Naylor
Date:
Subject: Re: GB18030-2022 Support in PostgreSQL