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

From: Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date: 2018-08-10 10:39:49
Message-ID: f3a111b1dae1dd18afa14101736a0e0f@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10-08-2018 11:33, Fabien COELHO wrote:
> Hello Marina,
>
>>> I'd suggest to let lookupCreateVariable, putVariable* as they are,
>>> call pgbench_error with a level which does not stop the execution,
>>> and
>>> abort if necessary from the callers with a "aborted because of
>>> putVariable/eval/... error" message, as it was done before.
>>
>> There's one more problem: if this is a client failure, an error
>> message inside any of these functions should be printed at the level
>> DEBUG_FAILS; otherwise it should be printed at the level LOG. Or do
>> you suggest using the error level as an argument for these functions?
>
> No. I suggest that the called function does only one simple thing,
> probably "DEBUG", and that the *caller* prints a message if it is
> unhappy about the failure of the called function, as it is currently
> done. This allows to provide context as well from the caller, eg
> "setting variable %s failed while <some specific context>". The user
> call rerun under debug for precision if they need it.

Ok!

> I'm still not over enthousiastic with these changes, and still think
> that it should be an independent patch, not submitted together with
> the "retry on error" feature.

In the next version I will put the error patch last, so it will be
possible to compare the "retry on error" feature with it and without it,
and let the committer decide how it is better)

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2018-08-10 11:27:52 Re: Doc patch for index access method function
Previous Message Alexander Korotkov 2018-08-10 10:37:55 Re: Doc patch for index access method function