>
>
>
> 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: pgbenchsetshell.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to