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
Message-ID: 89fc4e59-f374-853e-0bdb-52429c7d340e@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
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.

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 Content-Type Size
v2-0001-pgbench-Report-errors-during-run-better.patch text/plain 8.1 KB

In response to

Responses

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