Thanks for review! > There is however a small bug where workers can submit new commands > after the stop flag is set. > The flag is checked once at the top of the outer threadRun loop, but a > worker whose EINTR check was missed can go through a full iteration of > the state machine after the flag changes. This can make a few > transactions to reach the server. Maybe we should check > aborted_by_sigint in more places >
Hmm, yes, seems like check must be done before advanceConnectionState(), attached v2 with the fix > There was an earlier related thread "Make pgbench exit on SIGINT more > reliably" [0] which may contain useful context on Windows handling. > > [0] https://www.postgresql.org/message-id/CSSWBAX56CVY.291H6ZNNHK7EO@c3po > thanks for link, will take a look! -- Best regards, Roman Khapov
v2-0001-pgbench-print-partial-results-on-SIGINT.patch
Description: Binary data
