forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4a39f87
committed
Allow pgbench to retry in some cases.
When serialization or deadlock errors are reported by backend, allowto retry and continue the benchmarking. For this purpose new options"--max-tries", "--failures-detailed" and "--verbose-errors" are added.Transactions with serialization errors or deadlock errors will berepeated after rollbacks until they complete successfully or reach themaximum number of tries (specified by the --max-tries option), or themaximum time of tries (specified by the --latency-limit option).These options can be specified at the same time. It is not possible touse an unlimited number of tries (--max-tries=0) without the--latency-limit option or the --time option. By default the option--max-tries is set to 1, which means transactions withserialization/deadlock errors are not retried. If the last try fails,this transaction will be reported as failed, and the client variableswill be set as they were before the first run of this transaction.Statistics on retries and failures are printed in the progress,transaction / aggregation logs and in the end with other results (alland for each script). Also retries and failures are printedper-command with average latency by using option(--report-per-command, -r).Option --failures-detailed prints group failures by basic types(serialization failures / deadlock failures).Option --verbose-errors prints distinct reports on errors and failures(errors without retrying) by type with detailed information like whichlimit for retries was violated and how far it was exceeded for theserialization/deadlock failures.Patch originally written by Marina Polyakova then Yugo Nagatainherited the discussion and heavily modified the patch to make itcommitable.Authors: Yugo Nagata, Marina PolyakovaReviewed-by: Fabien Coelho, Tatsuo Ishii, Alvaro Herrera, Kevin Grittner, Andres Freund, Arthur Zakirov, Alexander Korotkov, Teodor Sigaev, Ildus KurbangalievDiscussion:https://postgr.es/m/flat/72a0d590d6ba06f242d75c2e641820ec%40postgrespro.ru1 parent383f222 commit4a39f87
File tree
6 files changed
+1594
-208
lines changed- doc/src/sgml/ref
- src
- bin/pgbench
- t
- fe_utils
- include/fe_utils
6 files changed
+1594
-208
lines changed0 commit comments
Comments
(0)