Re: pgbench - extend initialization phase control - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - extend initialization phase control
Date
Msg-id alpine.DEB.2.21.1910311944460.27369@lancre
Whole thread Raw
In response to Re: pgbench - extend initialization phase control  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Hello Masao-san,

>> If large scale factor is specified, the query for generating 
>> pgbench_accounts data can take a very long time. While that query is 
>> running, operators may be likely to do Ctrl-C to cancel the data 
>> generation. In this case, IMO pgbench should cancel the query, i.e., 
>> call PQcancel(). Otherwise, the query will keep running to the end.
>
> Hmmm. Why not. Now the infra to do that seems to already exists twice, once 
> in "src/bin/psql/common.c" and once in "src/bin/scripts/common.c".
>
> I cannot say I'm thrilled to replicate this once more. I think that the 
> reasonable option is to share this in fe-utils and then to reuse it from 
> there. However, ISTM that such a restructuring patch which not belong to this 
> feature. [...]

I just did a patch to share the code:

   https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1910311939430.27369@lancre
   https://commitfest.postgresql.org/25/2336/

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: fe-utils - share query cancellation code
Next
From: Andres Freund
Date:
Subject: Removing alignment padding for byval types