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-09 08:03:54 |
Message-ID: | Z1akatx3lLgm+nF+@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 Mon, Dec 09, 2024 at 02:39:58PM +0900, Michael Paquier wrote:
> On Sat, Dec 07, 2024 at 12:31:46PM +0300, Anton A. Melnikov wrote:
> > Completely agree that the original comment needs to be revised,
> > since it implies that it is normal for deleted entries to be here,
> > but it is not the case.
>
> Yep, so applied v2-0001 to document that, and backpatched it as it is
> kind of important to know about.
>
> > Maybe it's worth adding a warning as well,
> > similar to the one a few lines below in the code?
>
> Assert(!ps->dropped);
> if (ps->dropped)
> + {
> + PgStat_HashKey key = ps->key;
> + elog(WARNING, "found non-deleted stats entry %u/%u/%llu"
> + "at server shutdown",
There is a missing space. I think that should be " at server..." or "...%llu ".
> + key.kind, key.dboid,
> + (unsigned long long) key.objid);
> continue;
> + }
>
> /*
> * This discards data related to custom stats kinds that are unknown
>
> Not sure how to feel about this suggestion, though. This would
> produce a warning when building without assertions, but the assertion
> would likely let us more information with a trace during development,
> so..
Right. OTOH I think that could help the tap test added in da99fedf8c to not
rely on assert enabled build (the tap test could "simply" check for the
WARNING in the logfile instead).
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2024-12-09 08:41:48 | Re: refactor AlterDomainAddConstraint (alter domain add constraint) |
Previous Message | David Rowley | 2024-12-09 07:53:14 | Incorrect EXPLAIN ANALYZE output in bloom index docs |