Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date
Msg-id alpine.DEB.2.20.1803261748030.23514@lancre
Whole thread Raw
In response to Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors  (Marina Polyakova <m.polyakova@postgrespro.ru>)
Responses Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors  (Marina Polyakova <m.polyakova@postgrespro.ru>)
List 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.


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: PATCH: Exclude temp relations from base backup
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11