Re: WIP Patch: Pgbench Serialization and deadlock errors

From: Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors
Date: 2017-07-21 16:32:02
Message-ID: 1d516bfc555ddde18adbf14bd474f0a2@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hello again!

Here is the third version of the patch for pgbench thanks to Fabien
Coelho comments. As in the previous one, transactions with serialization
and deadlock failures are rolled back and retried until they end
successfully or their number of tries reaches maximum.

Differences from the previous version:
* Some code cleanup :) In particular, the Variables structure for
managing client variables and only one new tap tests file (as they were
recommended here [1] and here [2]).
* There's no error if the last transaction in the script is not
completed. But the transactions started in the previous scripts and/or
not ending in the current script, are not rolled back and retried after
the failure. Such script try is reported as failed because it contains a
failure that was not rolled back and retried.
* Usually the retries and/or failures are printed if they are not equal
to zeros. In transaction/aggregation logs the failures are always
printed and the retries are printed if max_tries is greater than 1. It
is done for the general format of the log during the execution of the
program.

Patch is attached. Any suggestions are welcome!

[1]
https://www.postgresql.org/message-id/alpine.DEB.2.20.1707121338090.12795%40lancre
[2]
https://www.postgresql.org/message-id/alpine.DEB.2.20.1707121142300.12795%40lancre

--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
v3-0001-Pgbench-Retry-transactions-with-serialization-or-.patch text/x-diff 86.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-07-21 16:32:22 Re: Increase Vacuum ring buffer.
Previous Message Andres Freund 2017-07-21 16:01:24 Re: [COMMITTERS] pgsql: Add a Gather executor node.