Re: BF mamba failure

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Kouber Saparev <kouber@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-10-16T00:43:48Z
Lists: pgsql-hackers
On Fri, Oct 11, 2024 at 08:18:58AM +0000, Bertrand Drouvot wrote:
> On Fri, Oct 11, 2024 at 11:07:29AM +0300, Kouber Saparev wrote:
>> Unfortunately not, we are running 15.4 and planning to upgrade very soon.
>> Is the patch mentioned already merged in PostgreSQL 16?
> 
> Yes, as of 16.4.

Right.  I'd surely welcome more eyes on what I have posted here:
https://www.postgresql.org/message-id/Zm-8Xo93K9yD9fy7@paquier.xyz

I am a bit annoyed by the fact of making PgStatShared_HashEntry
slightly larger to track the age of the entries, especially as this
comes down to being useful only when OID wraparound for all stats
kinds (well, except replslot data, because slot IDs can be more
aggressive or custom pgstats), but I don't really have a brighter idea
for the reason that this is something that we need to track at
entry-level to be able to tell across backends when a single stats
dshash entry can or cannot be reused.
--
Michael

Commits

  1. Add information about "generation" when dropping twice pgstats entry

  2. Fix race conditions with drop of reused pgstats entries