pgbench exit code

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
pgbench exit code
Дата
Msg-id
260c6cce-ff12-4c78-0c72-bd4a1a738cbd@2ndquadrant.com
Список
Дерево обсуждения
pgbench exit code Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pgbench exit code Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench exit code Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pgbench exit code Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench exit code Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pgbench exit code Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench exit code Michael Paquier <michael@paquier.xyz>
Re: pgbench exit code Michael Paquier <michael@paquier.xyz>
In pgbench, when an error occurs during a benchmark run (SQL error,
connection error, etc.) it just prints an error message and then
proceeds to print the run summary normally and exits with status 0.  So
this is quite inconvenient, especially from a script.

The attached patch changes this so that it exits with status 1 and also
prints a line below the summary advising that the results are incomplete.

The test suite had, curiously, encoded the previous behavior, checking
for exit status 0 vs 1 in various error situations.  In this patch, I
have just updated the expected results (which are all "1" now), but
perhaps we should remove listing that individually and just check for
nonzero in all cases somewhere centrally.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Andrew Dunstan
Дата:
Сообщение: Re: commitfest 2018-07
FAQ