Re: pgbench: new feature allowing to launch shell commands

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench: new feature allowing to launch shell commands
Date: 2009-12-03 04:12:23
Message-ID: c64c5f8b0912022012v35d8fe97v73b61f4796d25673@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
Sorry if you receive this email a second time, Greg, i didn't notice it has
not been sent to the hackers ML
Thanks for your first review.
I tried to work on most of the issues you noticed

> 1) Needs tab/space formatting cleaned up
This one is done, I adapted my environment to the Postgresql formats. I hope
there is nothing else more linked to that.
> 2) "Execution of meta-command failed" errors are a small but serious
problem
This error appears (n-1) times by using n threads with the j option. As you
said in your previous email there is some thread cleanup when one is
disconnected. This error still appears, I don't know yet which part of the
code is the origin of that. I needs more investigation.
> 3) Should consider how :variable interpretation should work in a
\[set]shell call
It is supported now. I implemented this, I made a test with your pearl
script, my own tests and it worked, at least no error appeared :)
> 4) General code cleanup, including possible refactoring
I didn't modify too much the code, I just noticed a couple of variables
unnecessary and some definitions not in adequacy with pgbench code. Btw,
what I did is included in the patch.
> 5) Update pgbench docs to cover new calls. I hoped to find time to help
with this, it looks like I'm not going to have it in the near future.
I tried to update the document writing a couple of lines describing simply
the new possible calls setshell and shell. I am not that skilled at sgml
though.
> 6) Should do basic performance regression testing to confirm this patch
doesn't impact pgbench results that don't use the new feature. This I'll
take care of, I'm not particularly worried about that based on what's been
changed so far.
Do you have an idea of what kind of tests could be done? I don't have so
much experience about common regression tests linked to pgbench.
I also added a second file including a couple of scripts written quickly
generating numbers based on the gauss and pareto density functions. It
cannot be used straightforwardly now, but still it can be a base for
something linked to setshell.

Regards,

Michael Paquier
NIPPON TELEGRAPH AND
TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
pgbenchshell2.1.patch application/octet-stream 6.2 KB
pgbenchstats.tar.gz application/x-gzip 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2009-12-03 05:35:23 Re: [Bacula-users] Catastrophic changes to PostgreSQL 8.4
Previous Message Tom Lane 2009-12-03 03:53:36 Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a