From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | kaido vaikla <kaido(dot)vaikla(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Invoke OOM killer |
Date: | 2023-07-07 16:07:37 |
Message-ID: | CAMkU=1y_ai2-PzGARhKZaq28JB72VwsqveZL2RuMCC6k+Hzj9A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Jul 6, 2023 at 12:27 PM kaido vaikla <kaido(dot)vaikla(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | M Sarwar | 2023-07-10 16:20:08 | Slow perormance |
Previous Message | Joe Conway | 2023-07-06 17:12:35 | Re: Invoke OOM killer |