Re: BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash - Mailing list pgsql-bugs

From Laurenz Albe
Subject Re: BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash
Date
Msg-id 0513e4694c2f7264f469fa5febc1662001f0a903.camel@cybertec.at
Whole thread Raw
In response to BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Mon, 2025-09-15 at 20:00 +0000, PG Bug reporting form wrote:
> PostgreSQL's array implementation can lead to server crashes due to
> uncontrolled memory consumption during array operations. When performing
> continuous array modifications within a loop, the server eventually exhausts
> available memory and crashes, affecting all connected sessions.

That's not a bug, that's a user error.
For reliable operation, you have to disable Linux' memory overcommit.
Then the kernel won't kill the database, but your query will receive an
"out of memory" error and fail without any crashes.

Yours,
Laurenz Albe



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash
Next
From: Thomas Munro
Date:
Subject: Re: BUG #19052: failing to install on Windows if user path contains Chineese/Korean characters