Re: make pg_ctl more friendly - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: make pg_ctl more friendly
Date
Msg-id 20240115213932.GA40905@nathanxps13
Whole thread Raw
In response to Re: make pg_ctl more friendly  (Junwang Zhao <zhjwpku@gmail.com>)
Responses Re: make pg_ctl more friendly
List pgsql-hackers
+    POSTMASTER_RECOVERY_SHUTDOWN,

Perhaps this should be POSTMASTER_SHUTDOWN_IN_RECOVERY to match the state
in the control file?

+            case POSTMASTER_RECOVERY_SHUTDOWN:
+                print_msg(_("PITR shutdown\n"));
+                print_msg(_("update configuration for startup again if needed\n"));
+                break;

I'm not sure I agree that this is a substantially friendlier message.  From
a quick skim of the thread, it seems like you want to avoid sending a scary
error message if Postgres was intentionally shut down while in recovery.
If I got this particular message, I think I would be worried that something
went wrong during my point-in-time restore, and I'd be scrambling to figure
out what configuration this message wants me to update.

If I'm correctly interpreting the intent here, it might be worth fleshing
out the messages a bit more.  For example, instead of "PITR shutdown,"
perhaps we could say "shut down while in recovery."  And maybe we should
point to the specific settings in the latter message.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: [17] CREATE SUBSCRIPTION ... SERVER
Next
From: Michael Paquier
Date:
Subject: Re: Add PQsendSyncMessage() to libpq