Re: pgbench - extend initialization phase control

From: Fabien COELHO <fabien(dot)coelho(at)mines-paristech(dot)fr>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: btendouan <btendouan(at)oss(dot)nttdata(dot)com>, "ibrar(dot)ahmad(at)gmail(dot)com:" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - extend initialization phase control
Date: 2019-10-31 18:46:30
Message-ID: alpine.DEB.2.21.1910311944460.27369@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)DEB(dot)2(dot)21(dot)1910311939430(dot)27369(at)lancre
https://commitfest.postgresql.org/25/2336/

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-10-31 18:48:21 Removing alignment padding for byval types
Previous Message Fabien COELHO 2019-10-31 18:43:36 fe-utils - share query cancellation code