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 1fRlZg-0004J0-N1 for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jun 2018 21:39:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fRlZf-0007X1-EZ for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jun 2018 21:39:03 +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 1fRlZf-0007Wq-3C for pgsql-hackers@lists.postgresql.org; Sat, 09 Jun 2018 21:39:03 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fRlZb-0003Bf-EJ for pgsql-hackers@postgresql.org; Sat, 09 Jun 2018 21:39:02 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 8DF8421C1CA7; Sun, 10 Jun 2018 00:38:57 +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 03AD921C1C87; Sun, 10 Jun 2018 00:38:56 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1528580337; bh=3idgfFwVbIWeNiohkRkvj4NsqPlrKNx+YuSIDzIbpJI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=eWO3z5x4MJgTfRNrYVIZk6kM2pUpT0oPtiJh8bNfbXNdKWXchhalbMRrxhq0P3uo1 vfPO8S7OVGesdnNyWZRplNT1fCgkgUzGjcKq1J3nepALrepHwYDwrIq+BkkdtIlxyl Q8Ts5secEr2Bz3zgzHPay5znUzZzAQ4A6DmArX58= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 10 Jun 2018 00:38:55 +0300 From: Marina Polyakova To: Fabien COELHO Cc: Alvaro Herrera , pgsql-hackers@postgresql.org, 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> 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 09-06-2018 16:31, Fabien COELHO wrote: > Hello Marina, Hello! >> v9-0002-Pgbench-errors-use-the-Variables-structure-for-cl.patch >> - a patch for the Variables structure (this is used to reset client >> variables during the repeating of transactions after >> serialization/deadlock failures). > > About this second patch: > > This extracts the variable holding structure, so that it is somehow > easier to reset them to their initial state on transaction failures, > the management of which is the ultimate aim of this patch series. > > It is also cleaner this way. > > Patch applies cleanly on top of the previous one (there is no real > interactions with it). It compiles cleanly. Global & pgbench "make > check" are both ok. :-) > The structure typedef does not need a name. "typedef struct { } V...". Ok! > I tend to disagree with naming things after their type, eg "array". > I'd suggest "vars" instead. "nvariables" could be "nvars" for > consistency with that and "vars_sorted", and because > "foo.variables->nvariables" starts looking heavy. > > I'd suggest but "Variables" type declaration just after "Variable" > type declaration in the file. Thank you, I agree and I'll fix all this. -- Marina Polyakova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company