Re: make pg_ctl more friendly

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Crisp Lee <litianxiang01(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: make pg_ctl more friendly
Date: 2024-01-16 02:32:55
Message-ID: CAEG8a3Jime71U52aBLL7cB9KxrHY5A1Wv-TMT-79c+PA+kBk4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nathan,

On Tue, Jan 16, 2024 at 5:39 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> + POSTMASTER_RECOVERY_SHUTDOWN,
>
> Perhaps this should be POSTMASTER_SHUTDOWN_IN_RECOVERY to match the state
> in the control file?

Agreed

>
> + 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."

Make sense. Fixed. See V4

> And maybe we should
> point to the specific settings in the latter message.

I've changed this latter message to:
update recovery target settings for startup again if needed

What do you think?

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

--
Regards
Junwang Zhao

Attachment Content-Type Size
v4-0001-PITR-shutdown-should-not-report-error-by-pg_ctl.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-01-16 02:48:15 Re: POC: GROUP BY optimization
Previous Message Kyotaro Horiguchi 2024-01-16 02:18:54 Re: Error "initial slot snapshot too large" in create replication slot