Re: Report bytes and transactions actually sent downtream

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Report bytes and transactions actually sent downtream
Date: 2026-02-10 15:40:45
Message-ID: CAExHW5saG=0E9MEba=FGW01CP4SDJooKwh3cSPQmxkiPrg6ELg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 10, 2026 at 7:08 PM Bertrand Drouvot
<bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>
> Hi,
>
> On Mon, Feb 02, 2026 at 02:06:07PM +0530, Ashutosh Bapat wrote:
> > On Tue, Jan 27, 2026 at 11:08 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > >
> > > Hi,
> > >
> > > On 2025-12-11 10:29:42 +0530, Ashutosh Bapat wrote:
> > > > Please review.
> > >
> > > I'd simplify the patch to, initially, to just track the sent bytes. For one,
> > > that's by *far* the most useful statistic. But I also have some concerns
> > > about the other stats:
> > >
> >
> > Ok. I have split the patch into two
>
> Thanks!
>
> > 0001 to track sent_bytes
> > 0002 to track filtered_bytes and sent_txns
> >
> > I think we all agree that sent_bytes is useful, so I suggest that we
> > review and commit 0001.
>
> I had a look at 0001 and it looks ok to me. That's an extract of the previous
> patches that we already iterated over up-thread.

Thanks.

>
> I just have a few more comments:
>
> 1/ commit message
>
> s/This statistics/This statistic/
>

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.

> 2/ LogicalOutputWrite
>
> + /* Update the amount of data sent downstream. */
>
> I think we can remove the period to be consistent with most of the one line
> comments around.

I see a few variations, starting with lower case, without a period at
the end etc. Don't see a standard per say. Let's defer for the
committer to decide.

>
> 3/ WalSndWriteData
>
> Same as 2/., remove the period for the same comment.
>

Same here. I see the following comment which has a period at the end.
/* Try taking fast path unless we get too close to walsender timeout. */

--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-02-10 15:52:16 Re: pgsql: Separate RecoveryConflictReasons from procsignals
Previous Message Heikki Linnakangas 2026-02-10 15:39:13 Re: Changing shared_buffers without restart