From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-hackers@postgresql.org, Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Date: Thu, 12 Jul 2018 11:28:34 +0300
Message-ID: <d63e60a8b741ea57e72b29c9efb2e2ca@postgrespro.ru> (raw)
In-Reply-To: <20180711174906.oscbjjivg6gc2riu@alvherre.pgsql>
References: <20180711174906.oscbjjivg6gc2riu@alvherre.pgsql>
On 11-07-2018 20:49, Alvaro Herrera wrote:
> On 2018-Jul-11, Marina Polyakova wrote:
>
>> can we try something like this?
>>
>> PGBENCH_ERROR_START(DEBUG_FAIL)
>> {
>> PGBENCH_ERROR("client %d repeats the failed transaction (try %d",
>> st->id, st->retries + 1);
>> if (max_tries)
>> PGBENCH_ERROR("/%d", max_tries);
>> if (latency_limit)
>> {
>> PGBENCH_ERROR(", %.3f%% of the maximum time of tries was used",
>> getLatencyUsed(st, &now));
>> }
>> PGBENCH_ERROR(")\n");
>> }
>> PGBENCH_ERROR_END();
>
> I didn't quite understand what these PGBENCH_ERROR() functions/macros
> are supposed to do. Care to explain?
It is used only to print a string with the given arguments to stderr.
Probably it might be just the function pgbench_error and not a macro..
P.S. This is my mistake, I did not think that PGBENCH_ERROR_END does not
know the elevel for calling exit(1) if the elevel >= ERROR.
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
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: m.polyakova@postgrespro.ru, alvherre@2ndquadrant.com, coelho@cri.ensmp.fr, i.kurbangaliev@postgrespro.ru, teodor@sigaev.ru
Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
In-Reply-To: <d63e60a8b741ea57e72b29c9efb2e2ca@postgrespro.ru>
* 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