Re: please update ps display for recovery checkpoint

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: please update ps display for recovery checkpoint
Date: 2020-12-09 18:37:22
Message-ID: B8C46DD1-557F-4D20-97DD-DBC16772457F@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/8/20, 10:16 PM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:
> On Wed, Dec 09, 2020 at 02:00:44AM +0900, Fujii Masao wrote:
>> I agree it might be helpful to display something like
>> "checkpointing" or "waiting for checkpoint" in PS title for the
>> startup process.
>
> Thanks.
>
>> But, at least for me, it seems strange to display "idle" only for
>> checkpointer.
>
> Yeah, I'd rather leave out the part of the patch where we have the
> checkpointer say "idle". So I still think that what v3 did upthread,
> by just resetting the ps display in all cases, feels more natural. So
> we should remove the parts of v5 from checkpointer.c.

That seems fine to me. I think it is most important that the end-of-
recovery and shutdown checkpoints are shown. I'm not sure there's
much value in updating the process title for automatic checkpoints and
checkpoints triggered via the CHECKPOINT command, so IMO we could skip
those, too. I made these changes in the new version of the patch.

> + * Reset the ps status display. We set the status to "idle" for the
> + * checkpointer process, and we clear it for anything else that runs this
> + * code.
> + */
> + if (MyBackendType == B_CHECKPOINTER)
> + set_ps_display("idle");
> + else
> + set_ps_display("");
> Regarding this part, this just needs a reset with an empty string.
> The second sentence is confusing (it partially comes fronm v3, from
> me..). Do we lose anything by removing the second sentence of this
> comment?

I've fixed this in the new version of the patch.

> + snprintf(activitymsg, sizeof(activitymsg), "creating %s%scheckpoint",
> [...]
> + snprintf(activitymsg, sizeof(activitymsg), "creating %srestartpoint",
> FWIW, I still fing "running" to sound better than "creating" here. An
> extra term I can think of that could be adapted is "performing".

I think I prefer "performing" over "running" because that's what the
docs use [0]. I've changed it to "performing" in the new version of
the patch.

Nathan

[0] https://www.postgresql.org/docs/devel/wal-configuration.html

Attachment Content-Type Size
v6-0001-Add-checkpoint-restartpoint-status-to-ps-display.patch application/octet-stream 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2020-12-09 18:49:44 Re: pg_stat_statements and "IN" conditions
Previous Message Dmitry Dolgov 2020-12-09 18:37:04 Re: [HACKERS] [PATCH] Generic type subscripting