pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Marina Polyakova <m.polyakova@postgrespro.ru>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Cc: Kevin Grittner <kgrittn@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors
Date: Fri, 14 Jul 2017 13:58:21 +0200 (CEST)
Message-ID: <alpine.DEB.2.20.1707141344070.20175@lancre> (raw)
In-Reply-To: <b8aa946758db5d8f1cd3a771e5733d69@postgrespro.ru>
References: <72a0d590d6ba06f242d75c2e641820ec@postgrespro.ru>
	<alpine.DEB.2.20.1707011607370.6840@lancre>
	<6b4a7fb36c9956595a89a08e5368a9c5@postgrespro.ru>
	<alpine.DEB.2.20.1707031321370.3419@lancre>
	<01df6ca86c78e2c80b4e4d021c99d53a@postgrespro.ru>
	<alpine.DEB.2.20.1707031430380.15247@lancre>
	<f69d534dfada1fdb4767496b7ffc007f@postgrespro.ru>
	<alpine.DEB.2.20.1707121142300.12795@lancre>
	<6ce8613f061001105654673506348c13@postgrespro.ru>
	<alpine.DEB.2.20.1707131818200.20175@lancre>
	<b8aa946758db5d8f1cd3a771e5733d69@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


Hello Marina,

>> Not necessarily? It depends on where the locks triggering the issue
>> are set, if they are all set after the savepoint it could work on a
>> second attempt.
>
> Don't you mean the deadlock failures where can really help rollback to

Yes, I mean deadlock failures can rollback to a savepoint and work on a 
second attempt.

> And could you, please, give an example where a rollback to savepoint can 
> help to end its subtransaction successfully after a serialization 
> failure?

I do not know whether this is possible with about serialization failures.
It might be if the stuff before and after the savepoint are somehow 
unrelated...

> [...] I mean that the sum of transactions with serialization failure and 
> transactions with deadlock failure can be greater then the totally sum 
> of transactions with failures.

Hmmm. Ok.

A "failure" is a transaction (in the sense of pgbench) that could not made 
it to the end, even after retries. If there is a rollback and the a retry 
which works, it is not a failure.

Now deadlock or serialization errors, which trigger retries, are worth 
counting as well, although they are not "failures". So my format proposal 
was over optimistic, and the number of deadlocks and serializations should 
better be on a retry count line.

Maybe something like:
   ...
   number of failures: 12 (0.004%)
   number of retries: 64 (deadlocks: 29, serialization: 35)

-- 
Fabien.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (137+ messages)  latest in thread

Message-ID: <alpine.DEB.2.20.1707141344070.20175@lancre>
Permalink:  ../alpine.DEB.2.20.1707141344070.20175@lancre/
Also on:    postgresql.org/message-id/alpine.DEB.2.20.1707141344070.20175@lancre

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: coelho@cri.ensmp.fr, m.polyakova@postgrespro.ru, kgrittn@gmail.com, andres@anarazel.de, alvherre@2ndquadrant.com, thomas.munro@enterprisedb.com, robertmhaas@gmail.com
  Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors
  In-Reply-To: <alpine.DEB.2.20.1707141344070.20175@lancre>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox