| From: | Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
| Cc: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pgbench: allow to exit immediately when any client is aborted |
| Date: | 2023-08-09 01:46:38 |
| Message-ID: | 20230809104638.56076c61a06b3fdc03e4743b@sraoss.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 9 Aug 2023 02:15:01 +0200 (CEST)
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>
> Hello Yugo-san,
>
> > There are cases where "goto done" is used where some error like
> > "invalid socket: ..." happens. I would like to make pgbench exit in
> > such cases, too, so I chose to handle errors below the "done:" label.
> > However, we can change it to call "exit" instead of "goo done" at each
> > place. Do you think this is better?
>
> Good point.
>
> Now I understand the "!= FINISHED", because indeed in these cases the done
> is reached with unfinished but not necessarily ABORTED clients, and the
> comment was somehow misleading.
>
> On reflection, there should be only one exit() call, thus I'd say to keep
> the "goto done" as you did, but to move the checking loop *before* the
> disconnect_all, and the overall section comment could be something like
> "possibly abort if any client is not finished, meaning some error
> occured", which is consistent with the "!= FINISHED" condition.
Thank you for your suggestion.
I'll fix as above and submit a updated patch soon.
Regards,
Yugo Nagata
--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Treat | 2023-08-09 02:29:50 | Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc? |
| Previous Message | Andres Freund | 2023-08-09 01:26:04 | Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc? |