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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] pgbench: new feature allowing to launch shell commands
Date: 2009-10-26 06:50:28
Message-ID: c64c5f8b0910252350w42f7ea13g52a6a88a86143374@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
>
> I see this in pgbench.c:
>
> /* return false iff client should be disconnected */
> static bool
> doCustom(CState *st, instr_time *conn_time)
>
> I think you need to increase the verbosity of the error messages when
> you're working on this code, because when I compile I get a slew of these
> errors pointing to the problem too:
> pgbench.c:1009: warning: return with no value, in function returning
> non-void
> The fix is that when there's an error, you need to do this:
>
> return clientDone(st, false);
>
Thanks for the tip. In fact I based my patch on postgres 8.4.1 and not on
the head of the git repository.
This explains why I did not go through the error messages returned by
doCustom.
The new version of the patch attached to this email has been made directly
from the git repository. It looks definitely cleaner this time.

I tried to clean the patch so as to pass the rest of the command line also,
so as not to have to do it later.
A short update of the setshell feature is also available on PostgreSQL's
wiki at the page pgbench shell command.

About the potential examples, I can also write a short script and put that
on the wiki.
As you said previously, the Pareto example is possible, but also why not
thinking about other statistical distributions? a Gaussian or a Poisson
distribution? There are many possibilities.

Regards,

--
Michael Paquier

NTT OSSC

Attachment Content-Type Size
pgbenchsetshell.patch application/octet-stream 4.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2009-10-26 07:12:04 Re: Proposal: String key space for advisory locks
Previous Message Christophe Pettus 2009-10-26 05:54:29 Proposal: String key space for advisory locks