Re: pgbench exit code

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench exit code
Date: 2018-10-09 10:11:43
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On 10/08/2018 01:41, Fabien COELHO wrote:
> Your approach of not changing the output too much but changing the exit
> status and adding a warning may get through more easily.
> Note that there is some logic in distinguishing between different type of
> errors (before the bench start vs the bench has started), so I'd suggest
> that the exit status should be different.


> The abort is by a client, but the code seems to only check the first
> client of a thread. ISTM that if the second or later client abort it may
> not be detected? Probably an intermediate aggregation at the thread level
> is needed, or maybe a global variable, or as errors are counted somewhere,
> it may be enough just to check that the count is non zero?


> - [ $status ? qr{^$} : qr{processed: 0/1} ],
> + [],
> The patch removes a check that there was an output and that no
> transactions where processed. ISTM it should be kept. If a different exit
> status is chosen on abort, that would allow to keep it easily.


> Probably there should be some documentation changes as well?


New patched attached.

Peter Eisentraut
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-pgbench-Report-errors-during-run-better.patch text/plain 8.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-10-09 10:20:40 Re: partition tree inspection functions
Previous Message Michael Paquier 2018-10-09 10:05:44 Re: partition tree inspection functions