Hello Tomas,

So I guess this is a bug in 12788ae49e1933f463bc59a6efe46c4a01701b76, or
one of the other commits touching this part of the code.

I could not reproduce this issue on head, but I confirm on 11.2.


AFAICS on head it's fixed by 3bac77c48f166b9024a5ead984df73347466ae12

Thanks for the information.

I pinpointed the exact issue in one go: no surprise given that the patch was motivated by cleaning up this kind of external state machine changes which I thought doubtful and error prone.

Attached is a fix to apply on pg11.

--
Fabien.
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 9eaa192239..e2093cdaca 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -5762,6 +5762,10 @@ threadRun(void *arg)
 			}
 		}
 
+		/* under throttling we may have finished the last client above */
+		if (remains == 0)
+			break;
+
 		/* also wake up to print the next progress report on time */
 		if (progress && min_usec > 0 && thread->tid == 0)
 		{

Reply via email to