Re: make pg_ctl more friendly

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: 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-10 03:33:03
Message-ID: CAEG8a3JkQ64SwO2Hn1pdyseyRmOVhGaBVp7e3SaEdR8uPgiYhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nazir,

On Tue, Jan 9, 2024 at 9:23 PM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
>
> Hi,
>
> Thank you for working on this! I agree that the current message is not friendly.
>
> On Thu, 9 Nov 2023 at 10:19, Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
> >
> > On Thu, Nov 9, 2023 at 3:08 PM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
> > >
> > > After a PITR shutdown, the db state should be *shut down in recovery*, try the
> > > patch attached.
> > >
> >
> > previous patch has some format issues, V2 attached.
>
> v2-0001-PITR-shutdown-should-not-report-error-by-pg_ctl.patch:
>
> - "Examine the log output.\n"),
> + "Examine the log output\n"),
> progname);
>
> I don't think that this is needed.
There seems to be no common sense for the ending dot when using
write_stderr, so I will leave this not changed.

>
> Other than that, the patch looks good and I confirm that after PITR shutdown:
>
> "PITR shutdown"
> "update configuration for startup again if needed"
>
> message shows up, instead of:
>
> "pg_ctl: could not start server"
> "Examine the log output.".
>
> nitpick: It would be better if the order of the error message cases
> and enums is the same ( i.e. 'POSTMASTER_RECOVERY_SHUTDOWN' before
> 'POSTMASTER_FAILED' in enum )
Agreed, fixed in V3

>
> --
> Regards,
> Nazir Bilal Yavuz
> Microsoft

--
Regards
Junwang Zhao

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-01-10 03:47:42 Re: Commitfest 2024-01 first week update
Previous Message Sutou Kouhei 2024-01-10 03:06:44 Re: Make COPY format extendable: Extract COPY TO format implementations