pgsql: Fix pgbench progress report behaviour when pgbench or a query ge

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pgbench progress report behaviour when pgbench or a query ge
Date: 2015-07-03 08:16:50
Message-ID: E1ZAw9S-00050V-4X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9d6352aaae1bf43f06253dcc931534a5254a937a

Modified Files
--------------
contrib/pgbench/pgbench.c | 47 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 45 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-07-03 08:52:27 pgsql: Remove thread-emulation support from pgbench.
Previous Message Heikki Linnakangas 2015-07-03 07:51:55 pgsql: Lift the limitation that # of clients must be a multiple of # of