Re: Fix doc: explanation of how postgres works when OOM killer is invoked

From: Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>
To: Manu <manuelreyesbravo(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix doc: explanation of how postgres works when OOM killer is invoked
Date: 2026-10-09 02:35:02
Message-ID: 3afa7212-fefe-45d2-b40a-62ee5d5254bf@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Manu

Thank you for the comments.
I registered this to CF https://commitfest.postgresql.org/patch/7407/ .

> I looked into this as well, and the patch matches what I see.

I checked the almost same thing as you did. Thank you for the confirmation.

>
> Two small things:
>
> - With restart_after_crash off, the server does not stay down passively:
> it logs 'shutting down because "restart_after_crash" is off' and shuts
> the whole cluster down, so a manual restart is needed. The patch gives
> the "on" case; it might be worth saying what "off" does too.
>
> - A little further down, this same section recommends protecting the
> postmaster with a low oom_score_adj so the OOM killer picks a child.
> With that in place the victim is a backend -- your "another server
> process" case -- while "the postmaster is terminated" is mostly what
> happens without that protection. Relating the two might help the
> reader, though it may be more than this fix intends.

Both of the points make sense. I added them in v2 patch.

Regards,
Takeshi Ideriha

Attachment Content-Type Size
v2-0001-Fix-explain-how-postgres-behaves-when-an-OOM-kill.patch text/plain 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Manu 2026-10-09 03:09:02 Re: Fix doc: explanation of how postgres works when OOM killer is invoked
Previous Message Hayato Kuroda (Fujitsu) 2026-10-09 02:34:36 RE: Incorrect CONTEXT reported for errors from parallel apply worker in logical replication