From: Michael Paquier <michael@paquier.xyz>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Unexpected behavior after OOM errors
Date: Fri, 19 Jun 2026 20:12:47 +0900
Message-ID: <ajUkLyWHxCeFVop_@paquier.xyz> (raw)
In-Reply-To: <CAEze2Wjh4_VmtD8C54q2drth2HSkCzBtgMZocuwj=z2gLDFcNQ@mail.gmail.com>
References: <e77acaac-a1b3-40b3-99ee-5769b4e453e4@gmail.com>
<CAEze2Wgktuo+_QWfbALRW-UXXZhbSC+OgGGDFDV9m_BLy5KozQ@mail.gmail.com>
<ajN2DkXPOzzC1GSj@paquier.xyz>
<CAEze2Wj3HUz+Z4A8GaoSQyP1V_qGZEkxhp6dquF3+gNyoAmJNw@mail.gmail.com>
<ajSFcksGRhNJEs5H@paquier.xyz>
<CAEze2Wjh4_VmtD8C54q2drth2HSkCzBtgMZocuwj=z2gLDFcNQ@mail.gmail.com>
On Fri, Jun 19, 2026 at 09:18:03AM +0200, Matthias van de Meent wrote:
> On Fri, 19 Jun 2026 at 01:55, Michael Paquier <michael@paquier.xyz> wrote:
>> We don't ERROR when failing to register a syscache/relcache callback,
>> we FATAL if we reach one of the thresholds.
>
> Ah, thanks for correcting me. I'm not sure why I had ERROR in mind,
> but you're obviously correct. Your patch v2 LGTM.
Cool, thanks.
>> Reaching these thresholds
>> points to me to a programming error anyway, so these should not matter
>> in the field.
>
> I don't think that's (necessarily) correct. These callbacks are
> accessible to extensions, and if you load sufficiently many of those
> you could still run out of slots even if each extension stayed well
> within a reasonable threshold.
Sure, but then the only way to get out of the problem is to patch the
backend so there are more slots available. At the end, when it comes
to core (and there should be some margin anyway), I am not really
worried.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, boekewurm+postgres@gmail.com, exclusion@gmail.com
Subject: Re: Unexpected behavior after OOM errors
In-Reply-To: <ajUkLyWHxCeFVop_@paquier.xyz>
References: <e77acaac-a1b3-40b3-99ee-5769b4e453e4@gmail.com> <CAEze2Wgktuo+_QWfbALRW-UXXZhbSC+OgGGDFDV9m_BLy5KozQ@mail.gmail.com> <ajN2DkXPOzzC1GSj@paquier.xyz> <CAEze2Wj3HUz+Z4A8GaoSQyP1V_qGZEkxhp6dquF3+gNyoAmJNw@mail.gmail.com> <ajSFcksGRhNJEs5H@paquier.xyz> <CAEze2Wjh4_VmtD8C54q2drth2HSkCzBtgMZocuwj=z2gLDFcNQ@mail.gmail.com> <ajUkLyWHxCeFVop_@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox