Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-14 Thread Takahiro Itagaki
Greg Smith wrote: > How about this: the version you updated at > http://archives.postgresql.org/pgsql-hackers/2009-12/msg00847.php , your > pgbenchshell_20091210.patch, worked perfectly for me except for one > complaint I've since dropped. How about we move toward committing that > one, an

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-14 Thread Greg Smith
Takahiro Itagaki wrote: Michael Paquier wrote: Yeah the grammar ":variable" is used to set a parameter, the user will feel disorientated if there is no support. The attached patch supports this new case, based on Itagaki-san's last version. What is the spec of "\setshell :variable" ?

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-14 Thread Takahiro Itagaki
Michael Paquier wrote: > Yeah the grammar ":variable" is used to set a parameter, the user will feel > disorientated if there is no support. > The attached patch supports this new case, based on Itagaki-san's last > version. What is the spec of "\setshell :variable" ? Literally interpreted, it

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-14 Thread Michael Paquier
Hi, Yeah the grammar ":variable" is used to set a parameter, the user will feel disorientated if there is no support. The attached patch supports this new case, based on Itagaki-san's last version. I also added a warning to tell the user that pgbench is slowing down when using this feature. If no

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-14 Thread Greg Smith
Takahiro Itagaki wrote: Heavily cleaned up patch attached. Please review it. This is almost there. The refactoring work you both did is exactly how I was hoping this would end up looking, code-wise, and the feature set is basically feature complete except for one small UI concern I have.

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-10 Thread Takahiro Itagaki
> Michael Paquier wrote: > > Please find attached the latest version of the patch, > > with the threading bug corrected and the documentation updated as well. Please don't describe your-specific usage of shell command in the documentation > Why do you use BUFFER_SIZE-1 for snprintf? >snprin

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-08 Thread Takahiro Itagaki
Michael Paquier wrote: > Please find attached the latest version of the patch, > with the threading bug corrected and the documentation updated as well. Why do you use BUFFER_SIZE-1 for snprintf? snprintf(commandShell, SHELL_COMMAND_SIZE-1, ...) Trailing nulls are also included in the length

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-06 Thread Michael Paquier
Please find attached the latest version of the patch, with the threading bug corrected and the documentation updated as well. The origin of the bug was the alarm signal. Once the duration is over, all the threads have to finish and timer_exceeded is set at true. A control on this variable in setsh

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-06 Thread Michael Paquier
The threading bug appears when a duration is set for pgbench tests. Instead of a duration, if a number of xacts is set, this error doesn't happen. If i understood the problem well, when the alarm signal comes, all the threads have to disconnect even the ones looking for a setshell parameter at thi

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-06 Thread Michael Paquier
Hi, I took care of making the 3 cases you mentioned working in the new version of the patch attached. It worked in my case for both shell and setshell without any problem. The code has also been reorganized so as to lighten the process in doCustom. It looks cleaner on this part. The only remainin

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-05 Thread Greg Smith
Michael Paquier wrote: > 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 perl script, my own tests and it worked, at least no error appeared :) It looks like how you did this is a little less compl

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-03 Thread Michael Paquier
I didn't send the good patch yesterday. => --; Here is the latest version. Regards, -- Michael Paquier NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 8a6437f..0bc6bfe 100644 --- a/contrib/pgbench/

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-02 Thread Michael Paquier
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 fo

Re: [HACKERS] pgbench: new feature allowing to launch shell commands

2009-12-01 Thread Greg Smith
Here's a first round of review of the patch submitted at http://archives.postgresql.org/message-id/c64c5f8b0910252350w42f7ea13g52a6a88a86143...@mail.gmail.com This is moving along nicely, and is now working (with some hacking) for the one use case I wanted it for. High-level summary of what I