Re: pgbench - extend initialization phase control
Fabien COELHO <fabien.coelho@mines-paristech.fr>
From: Fabien COELHO <fabien.coelho@mines-paristech.fr>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: btendouan <btendouan@oss.nttdata.com>,
"ibrar.ahmad@gmail.com:" <pgsql-hackers@lists.postgresql.org>
Date: 2019-10-31T18:46:30Z
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.DEB.2.21.1910311939430.27369@lancre https://commitfest.postgresql.org/25/2336/ -- Fabien.
Commits
-
Add query cancellation capabilities in pgbench init phase
- 1d468b9ad81b 13.0 landed
-
Add "G" (server-side data generation) as an initialization step in pgbench.
- a386942bd29b 13.0 landed