Re: when the startup process doesn't (logging startup delays)

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Stephen Frost <sfrost(at)snowman(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: when the startup process doesn't (logging startup delays)
Date: 2021-10-26 08:19:00
Message-ID: CALj2ACUwb3x+JFHkXp4Lf603Q3qFgK0P6kSsJvZkH4QAvGv4ig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 25, 2021 at 9:26 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Tue, Oct 19, 2021 at 9:06 AM Nitin Jadhav
> <nitinjadhavpostgres(at)gmail(dot)com> wrote:
> > Thanks for sharing the patch. Overall approach looks good to me. But
> > just one concern about using enable_timeout_every() functionality. As
> > per my understanding the caller should calculate the first scheduled
> > timeout (now + interval) and pass it as the second argument but this
> > is not the same in 'v2-0002-Quick-testing-hack.patch'. Anyways I have
> > done the changes as I have mentioned (like now + interval). Kindly
> > correct me if I am wrong. I am attaching 2 patches here.
> > 'v19-0001-Add-enable_timeout_every-to-fire-the-same-timeout.patch' is
> > the same as Robert's v2 patch. I have rebased my patch on top of this
> > and it is 'v19-0002-startup-progress.patch'.
>
> This version looks fine, so I have committed it (and my
> enable_timeout_every patch also, as a necessary prerequisite).

Thanks for getting this in.

I have few more thoughts:

Can we also log the total time the startup process took to recover,
and also the total time each stage of the recovery/redo processing
took: 1) into a file or 2) emitting that info via a new hook 3) into a
system catalog table (assuming at the end of the recovery the database
is in a consistent state, but I'm not sure if we ever update any
catalog tables in/after the startup/recovery phase).

This will help the users/admins/developers for summarizing, analytical
and debugging purposes. This information can easily help us to
understand the recovery patterns.

Thoughts?

If okay, I can spend some more time and start a separate thread to discuss.

Regards,
Bharath Rupireddy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-10-26 08:33:50 Setting log_connection in connection string doesn't work
Previous Message Shinya Kato 2021-10-26 08:04:24 Re: [PATCH] Added TRANSFORM FOR for COMMENT tab completion