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 1fo4pm-0005fO-TY for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Aug 2018 10:39:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fo4pl-0000ef-9Y for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Aug 2018 10:39:53 +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 1fo4pl-0000eY-2U for pgsql-hackers@lists.postgresql.org; Fri, 10 Aug 2018 10:39:53 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fo4pi-0003FQ-4S for pgsql-hackers@postgresql.org; Fri, 10 Aug 2018 10:39:52 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id BEF1521C2894; Fri, 10 Aug 2018 13:39:49 +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 8D31C21C2893; Fri, 10 Aug 2018 13:39:49 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1533897589; bh=Oai1pHx5IzPbaYjsYKjmfiKoHyO3UJH3GnXH3TeHcb8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=J444JDqDsk3jT6SIscc7mk0JFe9m1O0lwz1hA3mOskTJQAcAzOF1jcuI8q49wOm2a m1F2XcyMVHtyPeSWjKVnpL0bJjvGWmAfSTWD6dRqKtx9furx223uD9R1MSZQyd4H2v sQqvSsW2QOfi6nnvZkRhbfiQgJxxkm4wY0nGq1gE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 10 Aug 2018 13:39:49 +0300 From: Marina Polyakova To: Fabien COELHO Cc: pgsql-hackers@postgresql.org, Alvaro Herrera , Ildus Kurbangaliev , Teodor Sigaev Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors Organization: Postgres Professional In-Reply-To: References: <20180508193621.dphlgwrd5yz67o2z@alvherre.pgsql> <0569c5309cf536a839e2a3a1433bd113@postgrespro.ru> <976a25a46420c93866ada4051976b1be@postgrespro.ru> <25d7b1f518c218a8c335bdfc6c858ea1@postgrespro.ru> 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 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 ". 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