Re: please update ps display for recovery checkpoint

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(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-03 21:18:07
Message-ID: 9A1B9D98-4576-438A-943F-0AFB05946C7C@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I like the idea behind this patch. I wrote a new version with a
couple of changes:

1. Instead of using StringInfoData, just use a small buffer along
with snprintf(). This is similar to what the WAL receiver
process does.
2. If the process is the checkpointer, reset the display to "idle"
once the checkpoint or restartpoint is finished. It's easy
enough to discover the backend type, and I think adding a bit
more clarity to the checkpointer display is a nice touch.
3. Instead of "running," use "creating." IMO that's a bit more
accurate.

I considered also checking that update_process_title was enabled, but
I figured that these ps display updates should happen sparsely enough
that it wouldn't make much of an impact.

What do you think?

Nathan

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2020-12-03 21:44:21 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Justin Pryzby 2020-12-03 21:17:23 copy.sgml and partitioned tables