Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1waC8M-001b1H-17 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 12:46:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waC8K-00BH09-1h for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 12:46:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1waC8K-00BH01-0g for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2026 12:46:12 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1waC8H-000000015nK-2Nd8 for pgsql-hackers@postgresql.org; Thu, 18 Jun 2026 12:46:11 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2c0c3546924so7740655ad.3 for ; Thu, 18 Jun 2026 05:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781786767; x=1782391567; darn=postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6iXnXzvs6bnqB7TqrQPyEnwThmNFZU1j29eusKePqtQ=; b=Dp6AXdM5BH0OROAj/K6Zqy9NpxeSR9kQ1ybPGTSO1bBvdUNRZ8xhaLijIYweyZmX2K a36gREPeyl0+YKp6+n+b7bqGxYMPtCScIl9p9NSoI2jVZ59mKPNTWG2RkavY9sZSKSRq Kz4uhZrgZrMJNIEJBwG7cr0RnA8n5Yzc5zDIk2rwCREASNO3bf7yLtLlhZf8bqy9cedU kXJtnEwfetvfSUAvN00GX3weKbcPQgJXUWGqEVEqCKzxy2ftY1mEVVVzczG9dZcbVC68 jI9u+pIYN31HJA8ZZLLORKbPSuSmRROxzp4JgaIBJHxBIE81qOd9EJeXxw7jEtM7yvo+ L09A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781786767; x=1782391567; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6iXnXzvs6bnqB7TqrQPyEnwThmNFZU1j29eusKePqtQ=; b=ruAwlDTlXa1c0YzF1CqOWRU2JuKP4Ns4eW2kRBxt1PREnjKLUe4ZQauf3KuY9jDBC4 19UyAKvjxKL0Q/hXrUW2Ygxb9q7z+OCR8/YCalLYaAu19/PLvY2oABxjhwaAub+HpaIE K/YJd0CpODY00f1jDzCQCPsuc5wTzl7rFOCkKlYJeVwz+v6AHYeLOoqwlD61rqnePDwh olPfZQEjsmtG4iIiY/TVwIPqOS74XbEveHTpkya/lFwGBZElp7vj2Ov+Y2fQWXvfGy+c NvFI/7l30RN57VTKHK40M/eRRXmVOqcs1WjgHY8fe0d5VaK8MqRC4qvH6WZe5iJnare3 U6yw== X-Forwarded-Encrypted: i=1; AFNElJ8j/GZvorcFT1AI0ZIOdYKsRhqbv8lHbeV4rQno+5FWkjpZ2amElcp+gi1cTxhLdPbU04631mOpJ1jbuPH/@postgresql.org X-Gm-Message-State: AOJu0Yxf6WaZpiTXONsEOJw7wQK5EIt9vLNwAtvY7vkHuPVtOtYXp7q0 NtoflUiqdwBIz7aXjLm1Rblk9T6ZQiu/+JG7KwEAZzOK/GTJvm16B+13 X-Gm-Gg: AfdE7cmKz5w0AT9t46n9qL8PfgBg6dhqwTt80XhiaLsN3jpM5h6zQxcnr99QoLfRTQW 7iLpYAI3CIh/xfHYazQe23m1ENBRsD1dT2eDBJRfl+w4oiWQdAshsrAfdEbR16kc4fZFGHEAShX kNPsKXR8lHBnWZYzYtbK3q1yDeKpvQmt5lo0Jeypg4o+ZrAu7NE3H8q8K00epCKxGbSqjMUA97E wQTr4NA6cKR26b19F6L+ah+eUR/QP2QWHwfDzXdiNnyksgw5RkrJifh5LJxJnh9t2OXmDdLdkW4 4fCHjo1Bc+E0KFFQwzR5TcWJck2yCxSbDtzdqZy6NFm1n81ovQ/PhyxGeGxpRZVb7I8BiU57/YZ MmAv/yUKWjBlyN4QTEZwbaZ077nAuB96qHMp9DlE9Zsj/N/SfTF5Q0zKlA6T4QGl3aeDLaz+dGl vkdj2XJNtSK+PsDHbU9bzcKA== X-Received: by 2002:a17:903:178b:b0:2c6:a487:f431 with SMTP id d9443c01a7336-2c6e5276170mr39351945ad.23.1781786767020; Thu, 18 Jun 2026 05:46:07 -0700 (PDT) Received: from smtpclient.apple ([185.135.79.161]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c42f2e5374sm197402985ad.5.2026.06.18.05.46.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2026 05:46:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: pgbench --continue-on-error: clarify TPS and failure reporting From: Chao Li In-Reply-To: Date: Thu, 18 Jun 2026 20:45:29 +0800 Cc: Yugo Nagata , PostgreSQL-development , Rintaro Ikeda Content-Transfer-Encoding: quoted-printable Message-Id: <09361838-9213-4961-95A5-A0CD4AABF2DD@gmail.com> References: <597C9755-4386-488D-A289-16D50AD81FBF@gmail.com> <20260618143631.25c2ed34b1d7527ee2d92a17@sraoss.co.jp> <958C5B66-50B0-47C8-BBA5-7D32F7A09566@gmail.com> To: Fujii Masao X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jun 18, 2026, at 17:40, Fujii Masao wrote: >=20 > On Thu, Jun 18, 2026 at 3:25=E2=80=AFPM Chao Li = wrote: >> Thanks for confirming the doc issue. The here comes a small doc = patch. >>=20 >> I also noticed there is a later paragraph about =E2=80=9Clatency=E2=80=9D= that also needs an update, it=E2=80=99s included in the patch as well. >=20 > Thanks for the patch! The TPS-related changes look good to me. >=20 > The latency of a successful transaction includes the entire time of > - transaction execution with rollbacks and retries. The latency is = measured > - only for successful transactions and commands but not for failed > transactions > - or commands. > + transaction execution with rollbacks and retries. The latency is = measured > + only for successful transactions and commands, except that failed > + transactions are included in the simple average latency when the > + option is used. >=20 > It doesn't seem that the behavior of the latency average in the main > report depends on --continue-on-error itself. Instead, when neither > --progress, --rate, nor --latency-limit is specified, the main > report shows a simple latency average computed as the total benchmark > duration divided by the number of successful and failed transactions, > so failed transactions are included. >=20 > On the other hand, when any of those options is specified, the > latency average and latency stddev in the main report are based > only on successful transactions. Likewise, the per-script and > per-command latency statistics are measured only for successful > transactions and commands. >=20 > So how about something like this instead? >=20 > ------------------------------- > > The latency of a successful transaction includes the entire time of > - transaction execution with rollbacks and retries. The simple > - latency average shown in the main report is = computed from > - the total benchmark duration divided by both successful and failed > - transactions, and therefore includes failed transactions. In = contrast, > - detailed latency statistics, including the per-script and = per-command > - reports, are measured only for successful transactions and = commands, not > - for failed transactions or commands. > + transaction execution with rollbacks and retries. In the main = report, when > + neither , , nor > + is specified, the > + latency average is computed from the total = benchmark > + duration divided by both successful and failed transactions, and = therefore > + includes failed transactions. Otherwise, the latency > average > + and latency stddev shown in the main report are = measured > + only for successful transactions. Detailed latency statistics, = including > + the per-script and per-command reports, are also measured only for > + successful transactions and commands, not for failed transactions = or > + commands. > > ------------------------------- >=20 I feel that might be too detailed. Listing these three option names here = could make the doc harder to read and maintain. When failures are = included, the output line already says so explicitly: ``` latency average =3D 0.387 ms (including failures) ``` Can we simply say something like this? ``` The latency of a successful transaction includes the entire time of transaction execution with rollbacks and retries. The latency is = measured only for successful transactions and commands, not for failed = transactions or commands, unless the report explicitly says that it includes = failures. ``` Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/