aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/postgres-ref.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-11-21 11:59:29 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-11-21 11:59:29 -0500
commit51b5834cd53f0bd068729043b55f7da3ca6bb15f (patch)
treed1a1d9ab3d33e549360ef39d78f84662723940f9 /doc/src/sgml/ref/postgres-ref.sgml
parente2933a6e11791191050cd925d52d34e785eece77 (diff)
downloadpostgresql-51b5834cd53f0bd068729043b55f7da3ca6bb15f.tar.gz
postgresql-51b5834cd53f0bd068729043b55f7da3ca6bb15f.zip
Provide options for postmaster to kill child processes with SIGABRT.
The postmaster normally sends SIGQUIT to force-terminate its child processes after a child crash or immediate-stop request. If that doesn't result in child exit within a few seconds, we follow it up with SIGKILL. This patch provides GUC flags that allow either of these signals to be replaced with SIGABRT. On typically-configured Unix systems, that will result in a core dump being produced for each such child. This can be useful for debugging problems, although it's not something you'd want to have on in production due to the risk of disk space bloat from lots of core files. The old postmaster -T switch, which sent SIGSTOP in place of SIGQUIT, is changed to be the same as send_abort_for_crash. As far as I can tell from the code comments, the intent of that switch was just to block things for long enough to force core dumps manually, which seems like an unnecessary extra step. (Maybe at the time, there was no way to get most kernels to produce core files with per-PID names, requiring manual core file renaming after each one. But now it's surely the hard way.) I also took the opportunity to remove the old postmaster -n (skip shmem reinit) switch, which hasn't actually done anything in decades, though the documentation still claimed it did. Discussion: https://postgr.es/m/2251016.1668797294@sss.pgh.pa.us
Diffstat (limited to 'doc/src/sgml/ref/postgres-ref.sgml')
-rw-r--r--doc/src/sgml/ref/postgres-ref.sgml29
1 files changed, 3 insertions, 26 deletions
diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml
index 55a3f6c69d1..b13a16a117f 100644
--- a/doc/src/sgml/ref/postgres-ref.sgml
+++ b/doc/src/sgml/ref/postgres-ref.sgml
@@ -410,24 +410,6 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>-n</option></term>
- <listitem>
- <para>
- This option is for debugging problems that cause a server
- process to die abnormally. The ordinary strategy in this
- situation is to notify all other server processes that they
- must terminate and then reinitialize the shared memory and
- semaphores. This is because an errant server process could
- have corrupted some shared state before terminating. This
- option specifies that <command>postgres</command> will
- not reinitialize shared data structures. A knowledgeable
- system programmer can then use a debugger to examine shared
- memory and semaphore state.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-O</option></term>
<listitem>
<para>
@@ -466,14 +448,9 @@ PostgreSQL documentation
This option is for debugging problems that cause a server
process to die abnormally. The ordinary strategy in this
situation is to notify all other server processes that they
- must terminate and then reinitialize the shared memory and
- semaphores. This is because an errant server process could
- have corrupted some shared state before terminating. This
- option specifies that <command>postgres</command> will
- stop all other server processes by sending the signal
- <literal>SIGSTOP</literal>, but will not cause them to
- terminate. This permits system programmers to collect core
- dumps from all server processes by hand.
+ must terminate, by sending them <systemitem>SIGQUIT</systemitem>
+ signals. With this option, <systemitem>SIGABRT</systemitem>
+ will be sent instead, resulting in production of core dump files.
</para>
</listitem>
</varlistentry>