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 1fdJEq-0002V8-IN for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jul 2018 17:49:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fdJEo-0005vx-SN for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jul 2018 17:49:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdJEo-0005vk-Le for pgsql-hackers@lists.postgresql.org; Wed, 11 Jul 2018 17:49:14 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fdJEl-0003LF-4B for pgsql-hackers@postgresql.org; Wed, 11 Jul 2018 17:49:14 +0000 Received: by mail-qt0-x241.google.com with SMTP id h4-v6so21794782qtj.7 for ; Wed, 11 Jul 2018 10:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=EvQYdJ7D5ctSpvjr/DQbxjmIgTrMCcxe+pmmIu0HJok=; b=C+XtVX8F0v7CUjSOD/gL1HEf2GD33xwKBWcg89X9ZZo481IvJadhW5R5atkxgqUdY9 Z8mpssrSpqsVlUBaaQnfSM643L9NRAB3+VjXNdMQyRq7dqUlIWoz/nyh8fF9UOXSc2Gv diaeHLTzSnqZ1aot5trL4Ku4AmnPXO4kIGhrI2PD9oT1n5pj8P3kDJ8leP8noA0KuxuI CHwcrr3YF4ni5LugVEwmUyYeDIxVCLSCtlR348zstQWYfQYoLHrGIUIeJTthNcR3Ff2T YLg7ADhZWEJiLD2HqgtHpan5yC0AFETQuLIfQXql/qOQEcwSJSqPJ3vuaqYLehZaRNXs B/dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=EvQYdJ7D5ctSpvjr/DQbxjmIgTrMCcxe+pmmIu0HJok=; b=JLPF5lNdKJhLl6PUoJlBgGcg1gMOWeXQJqIz6Zi5i5Yh1nZT1iNfsqvJ1QSvTQi5nh ekj1GMzmQnnw34x3R9d8ztSBtT8V2v4dFz0l9tysUDoim2cMACH7h1zKhvtr7Sbuy4qr lfGnSyg8D1MBupeFXnjfRYHlCxuGj7ee957WGvDyNg0um+4fbkgcRg+Nnz46U7emyQKK HwJhb9umJtIMukuGL1QiSeG6a1PIckvIGJZZeL7UXwNjDuTtNq5JkDvKI7lrwxQuBbOl 8STDrxdO2aPBOENAx0YwkEN33KK3x4xw0xVRuqp8sAtvrdAjPLyEDHG9lZCvN6SL1jvJ D+JA== X-Gm-Message-State: AOUpUlGfBGP+qJvQKbJGiHW+NYggOPkZsVWwF2V3lrbMSdB06ZbJojM7 mZG//G+v3kRghpFSWxcdn3esEw== X-Google-Smtp-Source: AAOMgpcKVG5cKM+xvvMW/wK9sRzZ9dPVVfS1kAu82haQWXkWVomSkM1B7K7yDtAPyoFBgvUm1Ps+/Q== X-Received: by 2002:a0c:b310:: with SMTP id s16-v6mr291577qve.243.1531331349181; Wed, 11 Jul 2018 10:49:09 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id y49-v6sm18241728qty.91.2018.07.11.10.49.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 10:49:08 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id C00EA9F7; Wed, 11 Jul 2018 13:49:06 -0400 (-04) Date: Wed, 11 Jul 2018 13:49:06 -0400 From: Alvaro Herrera To: Marina Polyakova Cc: Fabien COELHO , pgsql-hackers@postgresql.org, Ildus Kurbangaliev , Teodor Sigaev Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors Message-ID: <20180711174906.oscbjjivg6gc2riu@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <976a25a46420c93866ada4051976b1be@postgrespro.ru> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services