Jan 2025

7 commits
Change shutdown sequence to terminate checkpointer last
25 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #180 of 3 reviewers saw the final version

The final shutdown patch in #18 produces identical contents in all four changed files after accommodating a preceding whitespace change. The commit message was rewritten to explain PMSIGNAL_XLOG_IS_SHUTDOWN and the separation of checkpoint completion from process exit.

  • Heikki Linnakangassaw an earlier versiontrailerHe endorsed the original design and proposed clearer shutdown-state names in #2, before signal allocation, fatal-error handling, and dead-end-child ordering changed.
  • Bertrand Drouvotsaw an earlier versiontrailerHe reviewed shutdown sequencing and error handling through #15 and #17, before the final series changed late fatal-error transitions and cleared ShutdownXLOGPending.
  • Nazir Bilal Yavuzsaw an earlier versiontrailerHe corrected an obsolete state name and explicitly deferred deeper shutdown review in #8, before the fatal-error and termination-order rework.
postmaster: Adjust which processes we expect to have exited
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #181 of 1 reviewer saw the final version

Applying the process-exit-mask patch from #18 to the commit parent reproduces src/backend/postmaster/postmaster.c exactly, including archiver and walsender handling during crash or immediate shutdown.

  • Bertrand Drouvotsaw the final versiontrailerHe explicitly approved adding archiver and walsender to the expected exiting processes in #15, and that patch remained unchanged.
postmaster: Commonalize FatalError paths
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #180 of 1 reviewer saw the final version

The HandleFatalError() consolidation patch from #18 reproduces the committed postmaster.c modulo one blank line, including direct transitions to PM_WAIT_DEAD_END during late shutdown.

  • Bertrand Drouvotsaw an earlier versiontrailerHe examined state transitions and proposed preserving checkpointer-fork-failure behavior in #15, before #18 changed late fatal errors to bypass PM_WAIT_BACKENDS.
checkpointer: Request checkpoint via latch instead of signal
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #182 of 2 reviewers saw the final version

The latch-notification patch from #18 reproduces src/backend/postmaster/checkpointer.c exactly, replacing kill(SIGINT) with SetLatch() and removing ReqCheckpointHandler().

  • Bertrand Drouvotsaw the final versiontrailerHe reviewed latch-related wording in #7 and explicitly approved the unchanged implementation in #15.
  • Nazir Bilal Yavuzsaw the final versiontrailerHis review in #8 explicitly included the latch patch while saying it needed further study, and only explanatory wording changed afterward.
postmaster: Don't open-code TerminateChildren() in HandleChildCrash()
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #181 of 1 reviewer saw the final version

The TerminateChildren() reuse patch from #18 reproduces postmaster.c exactly, including removal of sigquit_child() and relocation of the send_abort_for_crash explanation.

  • Bertrand Drouvotsaw the final versiontrailerHe checked that TerminateChildren() preserves syslogger exclusion and startup-process handling and approved the patch in #15, before only a comment was added.
postmaster: Don't repeatedly transition to crashing state
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #181 of 1 reviewer saw the final version

The early-return patch from #18 reproduces postmaster.c exactly. The only substantive textual difference is a small clarification in the commit message describing an existing FatalError state.

  • Bertrand Drouvotsaw the final versiontrailerHe reviewed the early return and identified the now-redundant ImmediateShutdown check in #15, which the final patch removes.
postmaster: Move code to switch into FatalError state into function
24 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #181 of 1 reviewer saw the final version

Applying the HandleFatalError() extraction patch from #18 reproduces postmaster.c exactly; apparent differences in the raw diffs are hunk alignment.

  • Bertrand Drouvotsaw the final versiontrailerHe reviewed ownership of FatalError assignment in #15 and accepted keeping it inside the helper in #17, with only invariant assertions and documentation subsequently added.

Jan 2025

4 commits
postmaster: Improve logging of signals sent by postmaster
10 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #43 of 3 reviewers saw the final version

Relative to #4, postmaster.c changes the macro parameter to sym, clarifies comments and PID wording, and substitutes a compiler-silencing return for the unreachable marker. The signal-routing and DEBUG3 logging design is unchanged.

  • Heikki Linnakangassaw the final versiontrailerHe proposed merging the signal logging wrappers and using a uniform DEBUG3 level in #2, which the revised patch adopted.
  • Bertrand Drouvotsaw the final versiontrailerHe reviewed macro naming and compiler-silencing behavior in #3, #6, and #7, with only light edits following.
  • Nazir Bilal Yavuzsaw the final versiontrailerHe suggested spacing and clearer PID wording in #8, both reflected in the committed version.
postmaster: Make btmask_add() variadic
10 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #43 of 3 reviewers saw the final version

The variadic btmask_add() patch from #4 reproduces postmaster.c exactly, including the array-based helper and consolidated mask-building call sites.

  • Heikki Linnakangassaw the final versionLLM analysis, 98% sureWhile reviewing the initial mask helper, he proposed making btmask_add() variadic in #2, and Andres implemented that suggestion in #4.
  • Bertrand Drouvotsaw the final versionLLM analysis, 100% sureHe explicitly marked the variadic btmask_add() patch as looking good in #7.
  • Nazir Bilal Yavuzsaw the final versionLLM analysis, 100% sureHe explicitly approved the variadic btmask_add() patch in #8.
postmaster: Rename some shutdown related PMState phase names
10 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surelanded as postedfrom patchset #41 of 1 reviewer saw the final version

The state-renaming patch from #4 reproduces both postmaster.c and src/backend/replication/README exactly, introducing PM_WAIT_XLOG_SHUTDOWN and PM_WAIT_XLOG_ARCHIVAL.

  • Nazir Bilal Yavuzsaw the final versiontrailerHe endorsed the naming and asked whether shutdown-related function names should also change in #8, which Andres explained were independently named in #9.
postmaster: Update pmState via a wrapper function
10 Jan 2025Andres Freundmaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #43 of 3 reviewers saw the final version

Relative to the UpdatePMState() patch in #4, postmaster.c only renames the stringification macro parameter and adds a compiler-silencing return after pg_unreachable(). The commit title and explanation are also polished.

  • Heikki Linnakangassaw the final versiontrailerHe endorsed the wrapper and recommended omitting numeric state values in #2, with only light changes afterward.
  • Bertrand Drouvotsaw the final versiontrailerHe participated in the initial review in #3 and explicitly approved the revised wrapper patch in #7.
  • Nazir Bilal Yavuzsaw the final versiontrailerHe explicitly approved the wrapper patch in #8, before minor macro and compiler-silencing edits.

Credits across 11 commits

Author
Andres FreundLLM11
Reviewer
Bertrand Drouvot9
Nazir Bilal Yavuz5
Heikki Linnakangas3
Committer
Andres Freund11

N LLM means N of the credits come from LLM analysis, not from commit trailers.