Re: Invoke OOM killer - Mailing list pgsql-admin

From Jeff Janes
Subject Re: Invoke OOM killer
Date
Msg-id CAMkU=1y_ai2-PzGARhKZaq28JB72VwsqveZL2RuMCC6k+Hzj9A@mail.gmail.com
Whole thread Raw
In response to Invoke OOM killer  (kaido vaikla <kaido.vaikla@gmail.com>)
List pgsql-admin
On Thu, Jul 6, 2023 at 12:27 PM kaido vaikla <kaido.vaikla@gmail.com> wrote:
Hi, 

How to invoke OOM killer for pg process?
Some easy "hack" for test purpose.

For most purposes, you can just pick a backend process ID, and send it a `kill -9`.  From the PostgreSQL perspective, that is just what the OOM killer does. 

If it needs to happen 'naturally', you could do something like:

set work_mem=50GB;
select * from generate_series(1,100000000) order by random();

Where the numbers may need to be adjusted based on your RAM.

Cheers,

Jeff

pgsql-admin by date:

Previous
From: Joe Conway
Date:
Subject: Re: Invoke OOM killer
Next
From: M Sarwar
Date:
Subject: Slow perormance