Re: Make pgbench exit on SIGINT more reliably

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make pgbench exit on SIGINT more reliably
Date: 2023-05-30 14:35:27
Message-ID: CSZORAWZRLQM.39GWAN7YKK9OJ@c3po
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue May 23, 2023 at 7:31 PM CDT, Michael Paquier wrote:
> On Mon, May 22, 2023 at 10:02:02AM -0500, Tristan Partin wrote:
> > The way that pgbench handled SIGINT changed in
> > 1d468b9ad81b9139b4a0b16b416c3597925af4b0. Unfortunately this had a
> > couple of unintended consequences, at least from what I can tell[1].
> >
> > - CTRL-C no longer stops the program unless the right point in pgbench
> > execution is hit
> > - pgbench no longer exits with a non-zero exit code
> >
> > An easy reproduction of these problems is to run with a large scale
> > factor like: pgbench -i -s 500000. Then try to CTRL-C the program.
>
> This comes from the code path where the data is generated client-side,
> and where the current CancelRequested may not be that responsive,
> isn't it?

Yes, that is exactly it. There is only a single check for
CancelRequested in the client-side data generation at the moment.

--
Tristan Partin
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-05-30 14:39:28 Re: Handle SIGTERM in fe_utils/cancel.c
Previous Message Mayer, Nicholas J 2023-05-30 13:48:10 Question - Does PostgreSQL have an Evaluation Assurance Level?