Re: pgbnech: allow to cancel queries during benchmark - Mailing list pgsql-hackers

From Yugo NAGATA
Subject Re: pgbnech: allow to cancel queries during benchmark
Date
Msg-id 20230810123244.bcd44ab06ce2ae1e89458706@sraoss.co.jp
Whole thread Raw
In response to Re: pgbnech: allow to cancel queries during benchmark  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbnech: allow to cancel queries during benchmark
List pgsql-hackers
On Wed, 9 Aug 2023 11:18:43 +0200 (CEST)
Fabien COELHO <coelho@cri.ensmp.fr> wrote:

> 
> I forgot, about the test:
> 
> I think that it should be integrated in the existing 
> "001_pgbench_with_server.pl" script, because a TAP script is pretty 
> expensive as it creates a cluster, starts it… before running the test.

Ok. I'll integrate the test into 001.
 
> I'm surprise that IPC::Run does not give any access to the process number. 
> Anyway, its object interface seems to allow sending signal:
> 
>      $h->signal("...")
> 
> So the code could be simplified to use that after a small delay.

Thank you for your information.

I didn't know $h->signal() and  I mimicked the way of
src/bin/psql/t/020_cancel.pl to send SIGINT to a running program. I don't
know why the psql test doesn't use the interface, I'll investigate whether
this can be used in our purpose, anyway.

Regards,
Yugo Nagata

> 
> -- 
> Fabien.


-- 
Yugo NAGATA <nagata@sraoss.co.jp>



pgsql-hackers by date:

Previous
From: Yugo NAGATA
Date:
Subject: Re: pgbnech: allow to cancel queries during benchmark
Next
From: Amit Kapila
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node