pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Be more verbose when the postmaster unexpectedly quits.
Date: Sun, 23 May 2021 14:50:27 +0000
Message-ID: <E1lkpQx-0000dr-TX@gemulon.postgresql.org> (raw)

Be more verbose when the postmaster unexpectedly quits.

Emit a LOG message when the postmaster stops because of a failure in
the startup process.  There already is a similar message if we exit
for that reason during PM_STARTUP phase, so it seems inconsistent
that there was none if the startup process fails later on.

Also emit a LOG message when the postmaster stops after a crash
because restart_after_crash is disabled.  This seems potentially
helpful in case DBAs (or developers) forget that that's set.
Also, it was the only remaining place where the postmaster would
do an abnormal exit without any comment as to why.

In passing, remove an unreachable call of ExitPostmaster(0).

Discussion: https://postgr.es/m/194914.1621641288@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bc2a389efb3b52d259cefd53c16cfa00742116f2

Modified Files
--------------
src/backend/postmaster/postmaster.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)



Message-ID: <E1lkpQx-0000dr-TX@gemulon.postgresql.org>
Permalink:  ../E1lkpQx-0000dr-TX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lkpQx-0000dr-TX@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Be more verbose when the postmaster unexpectedly quits.
  In-Reply-To: <E1lkpQx-0000dr-TX@gemulon.postgresql.org>
  References: <E1lkpQx-0000dr-TX@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox