Re: Make pgbench exit on SIGINT more reliably

Поиск
Список
Период
Сортировка
От Tristan Partin
Тема Re: Make pgbench exit on SIGINT more reliably
Дата
Msg-id CTZFJLBHY4DU.Z38WPJQ9MDUC@gonk
обсуждение исходный текст
Ответ на Re: Make pgbench exit on SIGINT more reliably  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Mon Jul 10, 2023 at 10:29 PM CDT, Michael Paquier wrote:
> On Tue, Jun 27, 2023 at 09:42:05AM -0500, Tristan Partin wrote:
> > I would say there probably isn't much benefit if you think the polling
> > for CancelRequested is fine. Looking at the other patch, I think it
> > might be simple to add an exit code for SIGINT. But I think it might be
> > best to do it after that patch is merged. I added the other patch to the
> > commitfest for July. Holding off on this one.
>
> Okay, I am going to jump on the patch to switch to COPY, then.

After looking at the other patch some more, I don't think there is a
good way to reliably exit from SIGINT. The only time pgbench ever polls
for CancelRequested is in initPopulateTable(). So if you hit CTRL+C at
any time during the execution of the other initalization steps, you're
out of luck. The default initialization steps are dtgvp, so after g we
have vacuuming and primary keys. From what I can tell pgbench will
continue to run these steps even after it has received a SIGINT.

This behavior seems unintended and odd to me. Though, maybe I am missing
something.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Tristan Partin"
Дата:
Сообщение: Re: Use COPY for populating all pgbench tables
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes