{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8", "published": "2026-10-19T08:06:37Z", "publisher": "PostgresAI", "article": {"title": "The Database Restarted Without Restarting: The Basics of PostgreSQL Signals (Part 1)", "url": "https://stormatics.tech/blogs/postgresql-signals-basics-part-1", "date_published": "2026-10-09T09:36:51Z", "author": "Shridhar Khanal", "publisher": "Stormatics"}, "grade": "A-", "axes": [{"axis": "Factual", "summary": "B+ \u00b7 1 wrong of 16 checked \u00b7 2 caveats"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 7 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 16 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "0 wrong \u00b7 0 caveats \u00b7 1 checked"}, {"axis": "Safe", "summary": "0 wrong \u00b7 0 caveats \u00b7 2 checked \u00b7 partly assessed"}], "findings": [{"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F1", "claim": "When any child of the postmaster is killed by a signal\u2026", "title": "Not every postmaster child death resets the cluster", "explanation": "The system logger is an exception. REL_18_6 src/backend/postmaster/postmaster.c:2471-2485 restarts it and continues without crash handling. TerminateChildren also excludes the logger. Treating every child death as cluster recovery sends incident diagnosis toward the wrong cause.", "verdict": "False", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L2471-L2485", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:2471-2485"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3470-L3535", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3470-3535"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L2477-L2484", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:2477-2484"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F2", "claim": "\u2026or be a member of the pg_signal_backend role.", "title": "The signaling permission list omits role membership and target restrictions", "explanation": "pg_signal_backend does not authorize signaling superuser-owned client backends. Privileges of the target role can authorize signaling without connecting as that role. REL_18_6 src/backend/storage/ipc/signalfuncs.c:30-180 enforces both rules. The article's list can cause failed incident commands or unnecessary grants.", "verdict": "Mostly accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L30-L180", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:30-180"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L80-L80", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:80-80"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28679-L28698", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28679-28698"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F3", "claim": "\u2026now() \u2013 query_start AS running_for, query FROM pg_stat_activity WHERE state = \u2018active\u2019\u2026", "title": "The printed session query contains invalid SQL punctuation", "explanation": "The printed query uses an en dash and curly quotes. REL_18_6 src/backend/parser/scan.l:335-370 defines ASCII minus as an operator. doc/src/sgml/syntax.sgml:300-310 specifies ASCII single quotes for strings. Copying the displayed query fails before it lists sessions.", "verdict": "Misquoted", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/scan.l#L366-L368", "label": "REL_18_6 \u00b7 src/backend/parser/scan.l:366-368"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/scan.l#L332-L335", "label": "REL_18_6 \u00b7 src/backend/parser/scan.l:332-335"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/syntax.sgml#L306-L308", "label": "REL_18_6 \u00b7 doc/src/sgml/syntax.sgml:306-308"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/scan.l#L335-L370", "label": "REL_18_6 \u00b7 src/backend/parser/scan.l:335-370"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/syntax.sgml#L300-L310", "label": "REL_18_6 \u00b7 doc/src/sgml/syntax.sgml:300-310"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F4", "claim": "\u2026SELECT pg_cancel_backend(48213);\u2026", "title": "pg_cancel_backend requests query cancellation with SIGINT", "explanation": "pg_cancel_backend sends SIGINT to the target backend. The backend installs StatementCancelHandler for SIGINT. REL_18_6 doc/src/sgml/func.sgml:28679-28698 describes cancellation of the current query. Protocol cancellation also delivers SIGINT. The recommendation to cancel before terminating matches these mechanisms.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L30-L180", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:30-180"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28679-L28698", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28679-28698"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/procsignal.c#L793-L793", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/procsignal.c:793-793"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/fe_utils/cancel.c#L165-L165", "label": "REL_18_6 \u00b7 src/fe_utils/cancel.c:165-165"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4190-L4260", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4190-4260"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F5", "claim": "\u2026SELECT pg_terminate_backend(48213);\u2026", "title": "pg_terminate_backend requests session termination with SIGTERM", "explanation": "pg_terminate_backend sends SIGTERM to the target backend. The backend installs die for SIGTERM. REL_18_6 doc/src/sgml/func.sgml:28757-28787 describes session termination. With the default zero timeout, success confirms signal delivery rather than completed termination.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L225-L305", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:225-305"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28757-L28787", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28757-28787"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4190-L4260", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4190-4260"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F6", "claim": "\u2026SELECT pg_reload_conf();\u2026", "title": "pg_reload_conf signals the postmaster and initiates configuration reload", "explanation": "pg_reload_conf sends SIGHUP to PostmasterPid. The postmaster reads configuration and signals tracked children except dead-end backends. REL_18_6 src/backend/postmaster/postmaster.c:1990-2010 implements that sequence. The version-matched documentation describes the same reload mechanism.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L225-L305", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:225-305"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L1990-L2010", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:1990-2010"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28721-L28740", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28721-28740"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4190-L4260", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4190-4260"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F7", "claim": "\u2026which is on by default.", "title": "restart_after_crash defaults to on and controls automatic reinitialization", "explanation": "restart_after_crash defaults to true in REL_18_6 src/backend/utils/misc/guc_tables.c:1297-1304. The postmaster exits when the setting is off. Otherwise, its recovery path recreates shared memory and starts the startup process. The documentation matches the default and effect.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L1297-L1304", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:1297-1304"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L11687-L11709", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:11687-11709"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3145-L3215", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3145-3215"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F8", "claim": "\u2026ORDER BY running_for DESC;\u2026", "title": "pg_stat_activity supplies the intended session and query-start columns", "explanation": "pg_stat_activity exposes pid, usename, state, query_start, and query. REL_18_6 src/backend/catalog/system_views.sql:878-904 defines those columns. The documentation identifies query_start as the active query's start time. Descending elapsed time orders older active queries first.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L878-L904", "label": "REL_18_6 \u00b7 src/backend/catalog/system_views.sql:878-904"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L857-L875", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:857-875"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F9", "claim": "The postmaster sees one of its children killed by a signal.", "explanation": "REL_18_6 src/backend/postmaster/postmaster.c:2523-2533 calls HandleChildCrash for untracked-child exits other than normal statuses 0 and 1. Lines 3145-3215 contain shared-memory recreation and startup-child creation. These excerpts do not establish the complete recovery path or preservation of the postmaster PID.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3145-L3215", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3145-3215"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L2523-L2533", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:2523-2533"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L2540-L2580", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:2540-2580"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/lock.c#L740-L749", "label": "REL_18_6 \u00b7 src/backend/storage/lmgr/lock.c:740-749"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L4387-L4402", "label": "REL_18_6 \u00b7 src/backend/storage/buffer/bufmgr.c:4387-4402"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F10", "claim": "Every connection gets its own.", "title": "The postmaster creates connection backends and background processes", "explanation": "REL_18_6 doc/src/sgml/arch-dev.sgml:85-145 describes a backend per connection and names the supervisor postmaster. The launch table registers checkpointer, WAL writer, and autovacuum launcher processes. Shared-memory initialization creates buffer and lock managers. The documented executable accepts postgres -D.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/arch-dev.sgml#L85-L145", "label": "REL_18_6 \u00b7 doc/src/sgml/arch-dev.sgml:85-145"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/launch_backend.c#L198-L205", "label": "REL_18_6 \u00b7 src/backend/postmaster/launch_backend.c:198-205"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/launch_backend.c#L184-L184", "label": "REL_18_6 \u00b7 src/backend/postmaster/launch_backend.c:184-184"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/ipci.c#L280-L330", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/ipci.c:280-330"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/runtime.sgml#L362-L362", "label": "REL_18_6 \u00b7 doc/src/sgml/runtime.sgml:362-362"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F12", "claim": "\u2026means that process didn\u2019t handle the signal\u2026", "title": "The terminated-by-signal message reports process death", "explanation": "LogChildExit emits the terminated-by-signal message when WIFSIGNALED reports signal termination. REL_18_6 src/backend/postmaster/postmaster.c:2760-2860 extracts the terminating signal with WTERMSIG. This message differs from the postmaster's configuration-reload receipt.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L2760-L2860", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:2760-2860"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F14", "claim": "\u2026Signal 1 (SIGHUP) normally tells PostgreSQL to reload its configuration.", "title": "SIGHUP normally requests configuration reload", "explanation": "PostgreSQL 18.6 installs SignalHandlerForConfigReload for backend SIGHUP. src/backend/tcop/postgres.c:4221 confirms the article's normal-case description.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4221-L4223", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4221-4223"}]}, {"anchor": "F15", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F15", "claim": "\u2026Cancels the current query ( pg_cancel_backend() )\u2026", "title": "pg_cancel_backend sends SIGINT for statement cancellation", "explanation": "src/backend/storage/ipc/signalfuncs.c:138 sends SIGINT. src/backend/tcop/postgres.c:4222 installs StatementCancelHandler for that signal.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4221-L4223", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4221-4223"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L138-L138", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:138-138"}]}, {"anchor": "F16", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F16", "claim": "\u2026Ends the session cleanly ( pg_terminate_backend() )\u2026", "title": "pg_terminate_backend sends SIGTERM", "explanation": "src/backend/storage/ipc/signalfuncs.c:251 sends SIGTERM. src/backend/tcop/postgres.c:4223 installs die to cancel the current query and exit.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4221-L4223", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4221-4223"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L251-L251", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:251-251"}]}, {"anchor": "F17", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F17", "claim": "\u2026This automatic recovery is controlled by the restart_after_crash setting\u2026", "explanation": "REL_18_6 src/backend/utils/misc/guc_tables.c:1301-1302 gives restart_after_crash a true default. E-54 establishes the default only. It does not show the recovery path or behavior when the setting is false.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L1301-L1302", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:1301-1302"}]}, {"anchor": "F18", "url": "https://pgtrue.postgres.ai/shared/brief/22a29543-cd01-4274-9e85-110ef3c82cc8#F18", "claim": "\u2026join our webinar on October 28\u2026", "title": "The linked webinar lists October 28, 2026", "explanation": "The linked registration page schedules the incident-triage webinar for October 28, 2026, at 2 PM GMT.", "verdict": "Accurate", "sources": [{"url": "https://resources.stormatics.tech/webinar-the-first-30-minutes-of-a-postgresql-incident-a-production-triage-playbook", "label": "https://resources.stormatics.tech/webinar-the-first-30-minutes-of-a-postgresql-incident-a-production-triage-playbook"}]}]}