1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

doc: Correct the description of server behavior after an OOM kill

The documentation stated that existing connections would continue to
function normally after the OOM killer terminated the postmaster.
In fact, those connections eventually terminate when server processes
detect the postmaster's death.

Clarify that the OOM killer can terminate either the postmaster or a
child process. If the postmaster is killed, the server must be restarted.
If a child process is killed, PostgreSQL typically terminates the
remaining connections and either recovers automatically or shuts down,
depending on restart_after_crash.

Backpatch to all supported versions.

Author: Takeshi Ideriha <iderihatakeshi@gmail.com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/ce269321-a7f4-48f4-a9ca-a4a4983b9fd6@gmail.com
Backpatch-through: 14
This commit is contained in:
Fujii Masao
2026-10-16 22:42:40 +09:00
parent 599e012921
commit fe624a3fdb

View File

@@ -1344,10 +1344,10 @@ default:\
The default virtual memory behavior on Linux is not
optimal for <productname>PostgreSQL</productname>. Because of the
way that the kernel implements memory overcommit, the kernel might
terminate the <productname>PostgreSQL</productname> postmaster (the
supervisor server process) if the memory demands of either
<productname>PostgreSQL</productname> or another process cause the
system to run out of virtual memory.
terminate a <productname>PostgreSQL</productname> server process,
including the postmaster (the supervisor server process), if the memory
demands of either <productname>PostgreSQL</productname> or another process
cause the system to run out of virtual memory.
</para>
<para>
@@ -1359,9 +1359,15 @@ Out of Memory: Killed process 12345 (postgres).
</programlisting>
This indicates that the <filename>postgres</filename> process
has been terminated due to memory pressure.
Although existing database connections will continue to function
normally, no new connections will be accepted. To recover,
<productname>PostgreSQL</productname> will need to be restarted.
If the postmaster is terminated, all connections will eventually be
terminated. To recover, <productname>PostgreSQL</productname> will
need to be restarted.
If a child process is terminated, <productname>PostgreSQL</productname> will
typically terminate all remaining connections and either recover
automatically, if
<link linkend="guc-restart-after-crash"><varname>restart_after_crash</varname></link>
is enabled, or shut down. If <productname>PostgreSQL</productname> shuts
down, it will need to be restarted to recover.
</para>
<para>