Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date: 2018-03-26 15:53:23
Message-ID: alpine.DEB.2.20.1803261748030.23514@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Marina,

> Many thanks to both of you! I'm working on a patch in this direction..
>
>> I think that the best approach for now is simply to reset (command
>> zero, random generator) and start over the whole script, without
>> attempting to be more intelligent. The limitations should be clearly
>> documented (one transaction per script), though. That would be a
>> significant enhancement already.
>
> I'm not sure that we can always do this, because we can get new errors until
> we finish the failed transaction block, and we need destroy the conditional
> stack..

Sure. I'm suggesting so as to simplify that on failures the retry would
always restarts from the beginning of the script by resetting everything,
indeed including the conditional stack, the random generator state, the
variable values, and so on.

This mean enforcing somehow one script is one transaction.

If the user does not do that, it would be their decision and the result
becomes unpredictable on errors (eg some sub-transactions could be
executed more than once).

Then if more is needed, that could be for another patch.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2018-03-26 16:06:10 Re: [HACKERS] MERGE SQL Statement for PG11
Previous Message Teodor Sigaev 2018-03-26 15:52:11 Re: PATCH: Exclude temp relations from base backup