Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3CHh-0000dF-Io for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 06:52:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3CHg-0000dZ-2v for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 06:52:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3CHf-0000dQ-QO for pgsql-hackers@lists.postgresql.org; Tue, 13 Jul 2021 06:52:47 +0000 Received: from mx0a-0050f201.pphosted.com ([148.163.145.86]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3CHZ-0007ms-Sw for pgsql-hackers@postgresql.org; Tue, 13 Jul 2021 06:52:46 +0000 Received: from pps.filterd (m0203369.ppops.net [127.0.0.1]) by mx0b-0050f201.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 16CLsM53023626 for ; Tue, 13 Jul 2021 15:52:40 +0900 Received: from sraihe.sra.co.jp (sraihe.sra.co.jp [221.255.117.38]) by mx0b-0050f201.pphosted.com with ESMTP id 39r7fuhhnq-1 for ; Tue, 13 Jul 2021 15:52:40 +0900 Received: from srascb.sra.co.jp (srascb [133.137.8.65]) by sraihe.sra.co.jp (Postfix) with ESMTP id 2EC7A2A6865 for ; Tue, 13 Jul 2021 15:52:39 +0900 (JST) Received: from sranhm.sra.co.jp (osspc25 [133.137.174.97]) by srascb.sra.co.jp (Postfix) with ESMTP id 0E9F05802D6 for ; Tue, 13 Jul 2021 15:52:39 +0900 (JST) Received: from yugon-CFSV7-1 (sraihb-hub.sra.co.jp [133.137.8.6]) by sranhm.sra.co.jp (Postfix) with SMTP id B2271A1449; Tue, 13 Jul 2021 15:52:38 +0900 (JST) Date: Tue, 13 Jul 2021 15:50:52 +0900 From: Yugo NAGATA To: Tatsuo Ishii Cc: coelho@cri.ensmp.fr, thomas.munro@gmail.com, m.polyakova@postgrespro.ru, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org, teodor@sigaev.ru Subject: Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors Message-Id: <20210713155052.0cedced0ea5d8d3cd4166d9d@sraoss.co.jp> In-Reply-To: <20210713.143500.1975764363406618158.t-ishii@gmail.com> References: <20210713.130049.878809075484022658.t-ishii@gmail.com> <20210713133224.db0d27ca57f423c1ef329cdc@sraoss.co.jp> <20210713.143500.1975764363406618158.t-ishii@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: doHCUHDYRUHe-5dkMi3Ns-81x-HsVtao X-Proofpoint-ORIG-GUID: doHCUHDYRUHe-5dkMi3Ns-81x-HsVtao X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10043 signatures=668682 X-Proofpoint-Spam-Details: rule=spam_low_notspam policy=spam_low score=0 adultscore=0 priorityscore=1501 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=459 clxscore=1034 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130042 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 13 Jul 2021 14:35:00 +0900 (JST) Tatsuo Ishii wrote: > >> > I would tend to agree with this behavior, that is not to start any new > >> > transaction or transaction attempt once -T has expired. > > > > That is the behavior in the latest patch. Once -T has expired, any new > > transaction or retry does not start. > > Actually v14 has not changed the behavior in this regard as explained > in different email: Right. Both of v13 and v14 doen't start any new transaction or retry once -T has expired. > >> > I'm a little hesitant about how to count and report such unfinished > >> > because of bench timeout transactions, though. Not counting them seems > >> > to be the best option. > >> > >> I agree. > > > > I also agree. Although I couldn't get an answer what does he think the actual > > harm for users due to termination of retrying by the -T option is, I guess it just > > complained about reporting the termination of retrying as failures. Therefore, > > I will fix to finish the benchmark when the time is over during retrying, that is, > > change the state to CSTATE_FINISHED instead of CSTATE_ERROR in such cases. > > I guess Fabien wanted it differently. Suppose "-c 10 and -T 30" and we > have 100 success transactions by time 25. At time 25 pgbench starts > next benchmark cycle and by time 30 there are 10 failing transactions > (because they are retrying). pgbench stops the execution at time > 30. According your proposal (change the state to CSTATE_FINISHED > instead of CSTATE_ERROR) the total number of success transactions will > be 100 + 10 = 110, right? No. The last failed transaction is not counted because CSTATE_END_TX is bypassed, so please don't worry. > Also actually I have explained the harm number of times but you have > kept on ignoring it because "it's subtle". My request has been pretty > simple. > > > number of failed transactions: 9 (0.916%) > > I don't like this and want to have the failed transactions to be 0. > Who wants a benchmark result having errors? I was asking you because I would like to confirm what you really complained about; whether the problem is that retrying transaction is terminated by -T option, or that pgbench reports it as the number of failed transactions? But now, I understood this is the latter that you don't want to count the temination of retrying as failures. Thanks. Regards, Yugo Nagata -- Yugo NAGATA