Hi,
On Wed, Dec 03, 2025 at 11:29:09PM +0500, Kirill Reshke wrote:
> On Wed, 3 Dec 2025 at 23:17, I wrote:
> > (I did derive the exact example
> > when postgresql immediately restarts after some SQL but im 100% there
> > is such thing )
>
> select repeat('a',1024*1024*1023) from generate_series(1, 100);
I get
out of memory for query result
I guess it depends on whether you have memory overcommit on or off,
and/or whether you run in a container/Kubernetes. Or maybe it depends on
something else.
This denial of service is a different problem, and I agree that Postgres
desperately needs a way to limit memory allocations per user (one can
set work_mem as high as 1.999TB as regular user) and globally.
Michael