pgbench: Ensure previous progress message is fully cleared when updating.
authorFujii Masao <fujii@postgresql.org>
Wed, 27 Nov 2024 14:04:55 +0000 (23:04 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 27 Nov 2024 14:04:55 +0000 (23:04 +0900)
commit0f13e1a78b145935e5a128a44cb828ea24bac72d
tree3f7275a2e0a2b62e791892c77b3d3e9d3c7745e4
parent4c0e70fc30e4800beb89af5dff44ab5f37fe6720
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: http://postgr.es/m/9a9b8b95b6a709877ae48ad5b0c59bb9@oss.nttdata.com
src/bin/pgbench/pgbench.c