Re: Unexpected behavior after OOM errors

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Alexander Lakhin <exclusion@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-06-20T06:03:20Z
Lists: pgsql-hackers
On Fri, Jun 19, 2026 at 09:22:28AM +0200, Matthias van de Meent wrote:
> Because it fixes an assertion, I'd vote for backpatching; but because
> the case is handled safely without assertions I also wouldn't be upset
> if it wasn't backpatched.

With some tweaks to the comments, applied this one on HEAD, without a
backpatch.
--
Michael

Commits

  1. Make type cache initialization more resilient on re-entry after OOM

  2. Make StandbyAcquireAccessExclusiveLock() more resilent with OOMs

  3. Make GetSnapshotData() more resilient on out-of-memory errors