Re: please update ps display for recovery checkpoint

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: k(dot)jamison(at)fujitsu(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: please update ps display for recovery checkpoint
Date: 2020-09-10 04:37:10
Message-ID: 20200910043710.GD2743@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 09, 2020 at 09:00:50PM -0500, Justin Pryzby wrote:
> What would you want the checkpointer's ps to say ?
>
> Normally it just says:
> postgres 3468 3151 0 Aug27 ? 00:20:57 postgres: checkpointer

Note that CreateCheckPoint() can also be called from the startup
process if the bgwriter has not been launched once recovery finishes.

> Or do you mean do the same thing as now, but one layer lower, like:
>
> @@ -8728,6 +8725,9 @@ CreateCheckPoint(int flags)
> + if (flags & CHECKPOINT_END_OF_RECOVERY)
> + set_ps_display("recovery checkpoint");

For the use-case discussed here, that would be fine. Now the
difficult point is how much information we can actually display
without bloating ps while still have something meaningful. Showing
all the information from LogCheckpointStart() would bloat the output a
lot for example. So, thinking about that, my take would be to have ps
display the following at the beginning of CreateCheckpoint() and
CreateRestartPoint():
- restartpoint or checkpoint
- shutdown
- end-of-recovery

The output also needs to be cleared once the routines finish or if
there is a skip, of course.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2020-09-10 05:18:29 Re: extension patch of CREATE OR REPLACE TRIGGER
Previous Message Justin Pryzby 2020-09-10 04:22:09 Re: Fix for parallel BTree initialization bug