Re: https://www.postgresql.org/docs/current/kernel-resources.html

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gibbsr(at)swebs(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: https://www.postgresql.org/docs/current/kernel-resources.html
Date: 2025-01-23 19:49:17
Message-ID: 216933.1737661757@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> I believe, that the export of PG_OOM_ADJUST_FILE should not point to the
> file that the postmaster uses, but should be for example:

> export PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj_child

> As if the example is blindly followed, then postmaster version of the file
> would be updated and become a candidate to be killed.

I don't think so. In the first place, you misunderstand what
this variable does: it is only consulted by postmaster child
processes not the postmaster itself. In the second place,
"/proc/self/oom_score_adj_child" isn't universal (it does not
exist on any of the Red-Hat-based distros I checked).

If it were universal and had the semantics that I guess it means from
the name, we could perhaps implement this feature differently and more
simply. But it's not, and I don't see a lot of value in supporting
two different implementations.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-01-27 07:51:00 timestamp with time zone ~> GMT
Previous Message PG Doc comments form 2025-01-23 14:32:28 https://www.postgresql.org/docs/current/kernel-resources.html