Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdWxw-00013w-Bd for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jul 2018 08:28:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fdWxu-0000D5-OZ for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jul 2018 08:28:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdWxu-0000Cu-AI for pgsql-hackers@lists.postgresql.org; Thu, 12 Jul 2018 08:28:42 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fdWxq-0003Co-4U for pgsql-hackers@postgresql.org; Thu, 12 Jul 2018 08:28:41 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 2A20321C26A2; Thu, 12 Jul 2018 11:28:35 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail.postgrespro.ru (cyclops.l.postgrespro.ru [192.168.27.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id ED4E421C2698; Thu, 12 Jul 2018 11:28:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1531384115; bh=WLQcLh1vC/oRnwSU5RO5I9d6nZlTYNeh4KO+ORh//BE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=BFSL3bVHNz/xJgwDZ4I3pqX3dBR602I5agfrtl2wImEZZrFSazUKy/uFb5VkE8lcq MkxY413K1Azz8ufgmDSidpZxqSM8P+p2CNpmb8Kiu8963u8DFUH4yWL7qZhkU72B1k yGmVTbxxajw8XeY3IQ+2m7IAKfvpyvfY5Bd+IN+U= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 12 Jul 2018 11:28:34 +0300 From: Marina Polyakova To: Alvaro Herrera Cc: Fabien COELHO , pgsql-hackers@postgresql.org, Ildus Kurbangaliev , Teodor Sigaev Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors Organization: Postgres Professional In-Reply-To: <20180711174906.oscbjjivg6gc2riu@alvherre.pgsql> References: <20180711174906.oscbjjivg6gc2riu@alvherre.pgsql> Message-ID: X-Sender: m.polyakova@postgrespro.ru User-Agent: Roundcube Webmail/1.2.4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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