From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru> |
Cc: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, 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 05:39:58 |
Message-ID: | Z1aCrhT9wl6p2g9t@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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",
+ 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..
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2024-12-09 06:03:10 | Re: Removing unneeded self joins |
Previous Message | Devanga.Susmitha@fujitsu.com | 2024-12-09 05:34:28 | Re: Popcount optimization using SVE for ARM |