Re: pgbench exit code - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pgbench exit code
Date
Msg-id 89fc4e59-f374-853e-0bdb-52429c7d340e@2ndquadrant.com
Whole thread Raw
In response to Re: pgbench exit code  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbench exit code  (Fabien COELHO <coelho@cri.ensmp.fr>)
List 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.

done

> 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?

fixed

>   -               [ $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.

fixed

> Probably there should be some documentation changes as well?

done

New patched attached.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: partition tree inspection functions
Next
From: Amit Langote
Date:
Subject: Re: partition tree inspection functions