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: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, 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-07-11 19:34:33
Message-ID: alpine.DEB.2.21.1807112124210.27883@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> can we try something like this?
>
> PGBENCH_ERROR_START(DEBUG_FAIL)
> {
> PGBENCH_ERROR("client %d repeats the failed transaction (try %d",

Argh, no? I was thinking of something much more trivial:

pgbench_error(DEBUG, "message format %d %s...", 12, "hello world");

If you really need some complex dynamic buffer, and I would prefer
that you avoid that, then the fallback is:

if (level >= DEBUG)
{
initPQstuff(&msg);
...
pgbench_error(DEBUG, "fixed message... %s\n", msg);
freePQstuff(&msg);
}

The point is to avoid building the message with dynamic allocation and so
if in the end it is not used.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-07-11 20:15:41 Re: make installcheck-world in a clean environment
Previous Message Alvaro Herrera 2018-07-11 19:13:30 Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints