]> granicus.if.org Git - postgresql/commit
Fix pgbench progress report behaviour when pgbench or a query gets stuck.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 3 Jul 2015 08:04:57 +0000 (11:04 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 3 Jul 2015 08:15:55 +0000 (11:15 +0300)
commit5174ca17a2479e9f9844d72cc6e777f473f83566
tree920ffc03025c288cb9864fe3fb5cd8629c084f01
parenteeaf1b6afacba0fc0a0e1878c2ed23f4fceef039
Fix pgbench progress report behaviour when pgbench or a query gets stuck.

There were two issues here. First, if a query got stuck so that it took
e.g. 5 seconds, and progress interval was 1 second, no progress reports were
printed until the query returned. Fix so that we wake up specifically to
print the progress report. Secondly, if pgbench got stuck so that it would
nevertheless not print a progress report on time, and enough time passes
that it's already time to print the next progress report, just skip the one
that was missed. Before this patch, it would print the missed one with 0 TPS
immediately after the previous one.

Fabien Coelho. Backpatch to 9.4, where progress reports were added.
src/bin/pgbench/pgbench.c