Re: pgbench: allow to exit immediately when any client is aborted

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Cc: coelho(at)cri(dot)ensmp(dot)fr, nagata(at)sraoss(dot)co(dot)jp
Subject: Re: pgbench: allow to exit immediately when any client is aborted
Date: 2023-08-19 10:51:56
Message-ID: 20230819.195156.836336030022808415.t-ishii@sranhm.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I have tested the v4 patch with default_transaction_isolation =
> 'repeatable read'.
>
> pgbench --exit-on-abort -N -p 11002 -c 10 -T 30 test
> pgbench (17devel, server 15.3)
> starting vacuum...end.
> transaction type: <builtin: simple update>
> scaling factor: 1
> query mode: simple
> number of clients: 10
> number of threads: 1
> maximum number of tries: 1
> duration: 30 s
> number of transactions actually processed: 64854
> number of failed transactions: 4 (0.006%)
> latency average = 4.628 ms (including failures)
> initial connection time = 49.526 ms
> tps = 2160.827556 (without initial connection time)
>
> Depite the 4 failed transactions (could not serialize access due to
> concurrent update) pgbench ran normally, rather than aborting the
> test. Is this an expected behavior?

I start to think this behavior is ok and consistent with previous
behavior of pgbench because serialization (and dealock) errors have
been treated specially from other types of errors, such as accessing
non existing tables. However, I suggest to add more sentences to the
explanation of this option so that users are not confused by this.

+ <varlistentry id="pgbench-option-exit-on-abort">
+ <term><option>--exit-on-abort</option></term>
+ <listitem>
+ <para>
+ Exit immediately when any client is aborted due to some error. Without
+ this option, even when a client is aborted, other clients could continue
+ their run as specified by <option>-t</option> or <option>-T</option> option,
+ and <application>pgbench</application> will print an incomplete results
+ in this case.
+ </para>
+ </listitem>
+ </varlistentry>
+

What about inserting "Note that serialization failures or deadlock
failures will not abort client. See <xref
linkend="failures-and-retries"/> for more information." into the end
of this paragraph?

BTW, I think:
Exit immediately when any client is aborted due to some error. Without

should be:
Exit immediately when any client is aborted due to some errors. Without

(error vs. erros)

Also:
+ <option>--exit-on-abort</option> is specified . Otherwise in the worst

There is an extra space between "specified" and ".".

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2023-08-19 11:09:25 Re: postgres_fdw: wrong results with self join + enable_nestloop off
Previous Message Amit Kapila 2023-08-19 10:09:20 Re: [PoC] pg_upgrade: allow to upgrade publisher node