pgbench: Ensure previous progress message is fully cleared when updating.
authorFujii Masao <fujii@postgresql.org>
Wed, 27 Nov 2024 14:01:53 +0000 (23:01 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 27 Nov 2024 14:01:53 +0000 (23:01 +0900)
commitaf35fe501af52f90355ac184a17643932a26464f
tree0218f3c9fba9fab560177b24e30af50f60c36d1c
parent09d09d4297b9acbc2848ec35e8bf030d6c1fae18
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
src/bin/pgbench/pgbench.c