From 43b0f718af0776588844effb2b71d353b219483b Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Fri, 16 Oct 2026 22:42:40 +0900 Subject: [PATCH] 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 Reviewed-by: Manuel Reyes Bravo Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/ce269321-a7f4-48f4-a9ca-a4a4983b9fd6@gmail.com Backpatch-through: 14 --- doc/src/sgml/runtime.sgml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index bbda0eee621..39ac430987d 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1340,10 +1340,10 @@ default:\ The default virtual memory behavior on Linux is not optimal for PostgreSQL. Because of the way that the kernel implements memory overcommit, the kernel might - terminate the PostgreSQL postmaster (the - supervisor server process) if the memory demands of either - PostgreSQL or another process cause the - system to run out of virtual memory. + terminate a PostgreSQL server process, + including the postmaster (the supervisor server process), if the memory + demands of either PostgreSQL or another process + cause the system to run out of virtual memory. @@ -1355,9 +1355,15 @@ Out of Memory: Killed process 12345 (postgres). This indicates that the postgres 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, - PostgreSQL will need to be restarted. + If the postmaster is terminated, all connections will eventually be + terminated. To recover, PostgreSQL will + need to be restarted. + If a child process is terminated, PostgreSQL will + typically terminate all remaining connections and either recover + automatically, if + restart_after_crash + is enabled, or shut down. If PostgreSQL shuts + down, it will need to be restarted to recover.