Re: Fix for Extra Parenthesis in pgbench progress message

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: btogiwarayuushi(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix for Extra Parenthesis in pgbench progress message
Date: 2024-11-09 05:46:00
Message-ID: 95f1100e-e59b-41b7-a406-f865c2e69db7@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024/11/08 11:47, Tatsuo Ishii wrote:
> I think you need to adjust
>
> fprintf(stderr, "%*c\r", chars - 1, ' '); /* Clear the current line */
>
> to:
>
> fprintf(stderr, "%*c\r", chars, ' '); /* Clear the current line */
>
> since now chars does not consider the EOL char. By clearing chars - 1,
> the closing parenthesis will be left on the screen.

You're right! I've updated the patch and attached v4.

About the back-patch: initially, there were concerns it might be too invasive,
as you told upthread. However, after our discussion, I think the latest version
is straightforward enough, and I'm okay with back-patching it. Thoughts?

Since the minor release freeze is already in effect, if we commit this patch,
we'll need to wait until the next minor releases are out next week before
the commit and back-patch.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
v4-0001-pgbench-Ensure-previous-progress-message-is-fully.patch text/plain 3.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2024-11-09 06:25:59 Re: Fix for Extra Parenthesis in pgbench progress message
Previous Message Bertrand Drouvot 2024-11-09 05:04:47 Re: pg_combinebackup --incremental