Re: DSA_ALLOC_NO_OOM vs dsm_create ERROR leaving a half-initialized pgstats hash entry

From: Grigorev Jurij <ju(dot)grigorev(at)ftdata(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DSA_ALLOC_NO_OOM vs dsm_create ERROR leaving a half-initialized pgstats hash entry
Date: 2026-09-17 08:35:15
Message-ID: 0eb7233253374bce9f8ec0111a40b732@localhost.localdomain
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Agreed on all three points!

The two changes touch separate parts of pgstat_shmem.c, so the current
HEAD patch should apply cleanly on top of the defensive change. I do
not expect any conflicts, but I will rebase and resend it if needed.

And yeah, regarding the ABI concern, even though pgstat_init_entry()
is declared in pgstat_internal.h and I found no external users, changing
its signature in stable branches does not seem worth the compatibility
risk. I therefore agree that this patch should be limited to HEAD.

And agreed, no injection test for this narrow path!

Thanks,
Yuriy

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-09-17 08:37:35 Re: Race conditions in logical decoding
Previous Message Nisha Moond 2026-09-17 08:34:42 Re: Distinguish publication exclusions in object addresses