Re: shared-memory based stats collector - v70

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: shared-memory based stats collector - v70
Date: 2024-12-05 07:37:27
Message-ID: Z1FYN+t8dNX6MjZn@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Dec 05, 2024 at 02:43:43PM +0900, Michael Paquier wrote:
> On Wed, Dec 04, 2024 at 03:24:55PM +0000, Bertrand Drouvot wrote:
> > Thanks! I've the feeling that something has to be fixed, see my comments in
> > [1]. It might be that the failed assertion does not handle a "valid" scenario.
> >
> > [1]: https://www.postgresql.org/message-id/Z1BzI/eMTCOKA%2Bj6%40ip-10-97-1-34.eu-west-3.compute.internal
>
> It's really a case that should never be reached because it points to
> an inconsistency in the interactions between the local entry cache in
> a process and the central dshash it attempts to point to, so I don't
> think that there is anything to change here.

Agree.

> As Andres has mentioned,
> it has a lot of value by acting as a safety guard in assert builds
> without being annoying for production deployments.

Fully agree.

That said, I think that's worth to update the comment a bit (like in the
attached?) as I think that answers a legitimate question someone could have while
reading this code.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-Improve-comment-around-code-that-should-not-be-re.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro Ikeda 2024-12-05 07:48:27 Re: Doc: clarify the log message level of the VERBOSE option
Previous Message Yugo NAGATA 2024-12-05 07:23:16 Re: Doc: clarify the log message level of the VERBOSE option