Re: Missing dshash cleanup in pgstat_read_statsfile() after OOM

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Grigorev Jurij <ju(dot)grigorev(at)ftdata(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Missing dshash cleanup in pgstat_read_statsfile() after OOM
Date: 2026-09-08 07:05:24
Message-ID: ap-zs1RkQsIqV1pw@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 08, 2026 at 06:34:29AM +0000, Grigorev Jurij wrote:
> I have since traced the ASan failure to a different path: an error raised
> while creating a new DSM segment can escape
> dsa_allocate_extended(..., DSA_ALLOC_NO_OOM) after pgstat_init_entry()
> has marked the hash entry live but before its body is assigned. I will
> report that separately with the logs and a patch.

Yeah.. I'm.. cough.. Aware of that. The annoying thing is that
this touches a very low-level subsystem, but I have to admit that I
have not spent cycles thinking about the possible options here.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-09-08 07:05:35 Re: Crashes on a partition whose concurrent detach never finished
Previous Message solai v 2026-09-08 06:58:12 Re: UPDATE run check constraints for affected columns only