pgbench: Ensure previous progress message is fully cleared when updating.

Fujii Masao <fujii@postgresql.org>

Commit: adb103fcacdde73d1446d72ce9c2da414c86bd74
Author: Fujii Masao <fujii@postgresql.org>
Date: 2024-11-27T14:03:04Z
Releases: 17.3
pgbench: Ensure previous progress message is fully cleared when updating.

During pgbench's table initialization, progress updates could display
leftover characters from the previous message if the new message
was shorter. This commit resolves the issue by appending spaces to
the current message to fully overwrite any remaining characters from
the previous line.

Back-patch to all the supported versions.

Author: Yushi Ogiwara, Tatsuo Ishii, Fujii Masao
Reviewed-by: Tatsuo Ishii, Fujii Masao
Discussion: https://postgr.es/m/9a9b8b95b6a709877ae48ad5b0c59bb9@oss.nttdata.com

Files

PathChange+/−
src/bin/pgbench/pgbench.c modified +16 −5

Discussion