Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead

From: Andres Freund <andres(at)anarazel(dot)de>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: magnus(at)hagander(dot)net, Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead
Date: 2021-09-06 07:22:02
Message-ID: 20210906072202.bxib33k3dvzmiij3@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-09-06 09:12:58 +0200, Laurenz Albe wrote:
> Reading your patch, I am still confused about the following:
> There are potentially several calls to "pgstat_send_tabstat" in "pgstat_report_stat".
> It seems to me that if it were called more than once, session statistics would
> be reported and counted several times, which would be wrong.

The accumulator variables are set to zero after being sent. So no data should
be sent multiple times as far as I can tell.

Regards,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message REIX, Tony 2021-09-06 07:31:45 RE: AIX: Symbols are missing in libpq.a
Previous Message Michael Paquier 2021-09-06 07:17:28 Re: pg_receivewal starting position