Re: pgbench: new feature allowing to launch shell commands - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pgbench: new feature allowing to launch shell commands
Date
Msg-id c64c5f8b0912022012v35d8fe97v73b61f4796d25673@mail.gmail.com
Whole thread Raw
In response to Re: pgbench: new feature allowing to launch shell commands  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: pgbench: new feature allowing to launch shell commands  (Michael Paquier <michael.paquier@gmail.com>)
Re: pgbench: new feature allowing to launch shell commands  (Greg Smith <greg@2ndquadrant.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Next
From: Hitoshi Harada
Date:
Subject: Re: Cost of sort/order by not estimated by the query planner