Re: contrib/pg_stat_tcpinfo - Mailing list pgsql-hackers

From Jakub Wartak
Subject Re: contrib/pg_stat_tcpinfo
Date
Msg-id CAKZiRmxEOkK4E-o5fG5qvzUirE3-KV1w=UQZk-FGBJAmcGfDsQ@mail.gmail.com
Whole thread Raw
In response to Re: contrib/pg_stat_tcpinfo  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Sat, Nov 8, 2025 at 1:18 AM Andres Freund <andres@anarazel.de> wrote:

Hi Andres!

>> But maybe it's very useful in practice, don't know.

> FWIW, I've needed this many times. Without the TCP information it's very hard
> to figure out why higher latency connections aren't keeping up - is it packet
> loss, it it too small network buffers on the sending/receiving side, is it the
> remote side not keeping up on the CPU level...

Pretty much the same!

> > I don't follow? Why do you want to format data the way "ss" does?
>
> Yea, I don't get that either - IMO ss's format is just about the worst
> possible format. It's very hard to parse and doesn't seem to have advantages
> making up for that.

Well yes, I've probably used the wrong expression there ("format as
the ss does"). Technically `ss` might return multiple lines and lacks
extraction of specific hosts/ports (well one can use filters, but...),
but here we have normal fields like src/dst/srcport/dstport + we can
apply WHERE on extracted JSON columns (->). I think it's way better in
pg_stat_tcpinfo even today than in ss, but I could adapt further based
on some feedback. E.g. rather than appending Vegas/BBR info like `ss`
does, we could put nested structure, just like I've did with "skmem",
so technically it's the same data as in ss, but format would not be
exactly the same, but use similar-looking names, so that someone
familiar with `ss` would know how to use it.

Still , it is still PoC, and I'm not sure if the community is open to
accept (or reject it).

-J.



pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Re: contrib/pg_stat_tcpinfo
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions