Hi,

On Fri, Dec 05, 2025 at 12:38:16PM +0500, Kirill Reshke wrote:
> On Fri, 5 Dec 2025, 12:32 Michael Banck, <[email protected]> wrote:
> The idea here is that you get OOM which will lead to restart.

Right, but you only get OOM if you have memory overcommit enabled (or
are running Postgres in a cgroupv2 container) was my point. Otherwise,
you just get an error:

postgres=# SET work_mem = '1.995TB';
SET
postgres=# select repeat('a',1024*1024*1023) from generate_series(1, 100);
out of memory for query result
postgres=# SELECT 1;
 ?column? 
----------
        1
(1 row)

> Aslo you can change archive command to 'shutdown'.

Yeah.


Michael


Reply via email to