Re: BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: sibowu(at)amazon(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19054: Memory exhaustion vulnerability in PostgreSQL array operations leads to server crash
Date: 2025-09-15 20:30:17
Message-ID: 0513e4694c2f7264f469fa5febc1662001f0a903.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Tom Lane 2025-09-15 20:06:26 Re: BUG #18959: Name collisions of expression indexes during parallel Index creations on a pratitioned table.