| From: | Roman Khapov <rkhapov(at)yandex-team(dot)ru> |
|---|---|
| To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Print pgbench results on SIGINT |
| Date: | 2026-10-28 05:04:00 |
| Message-ID: | 39384C28-7D89-4E8A-A85F-952309075357@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-pgbench-print-partial-results-on-SIGINT.patch | application/octet-stream | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirill Reshke | 2026-10-28 05:12:22 | Re: kqueue backend for pgbench |
| Previous Message | jian he | 2026-10-28 03:16:07 | Re: Row pattern recognition |