Skip to content

Commit ab07a04

Browse files
author
Marina Polyakova
committed
Fix Pgbench: serialization/deadlock failure record in the stats
A failure should be reported only once, and not after a failure and after the end of a failed transaction block.
1 parent af9ac47 commit ab07a04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,8 @@ doCustom(TState *thread, CState *st, StatsData *agg)
21502150
}
21512151
}
21522152

2153-
if (st->last_begin_state->attempts_number ==
2153+
if ((serialization_failure || deadlock_failure) &&
2154+
st->last_begin_state->attempts_number ==
21542155
max_attempts_number)
21552156
{
21562157
/*

0 commit comments

Comments
 (0)