Hello Peter,
The documentation and pgbench --help output that accompanied this patch
claims that the argument to pgbench --partition-method is optional and
defaults to "range", but that is not actually the case, as the
implementation requires an argument. Could you please sort this out?
AFAICS, if the user omits this argument, then the default is range as
specified in docs. I tried by using something like 'pgbench.exe -i -s
1 --partitions=2 postgres' and then run 'pgbench -S postgres'.
Ah, the way I interpreted this is that the argument to --partition-method
itself is optional.
Yep. Optionnal stuff would be in [], where () is used for choices.
Would the attached have improved your understanding? It is somehow more
consistent with other help lines.
--
Fabien.
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index a1e0663c8b..8d4f5f0866 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -639,7 +639,7 @@ usage(void)
" --index-tablespace=TABLESPACE\n"
" create indexes in the specified tablespace\n"
" --partitions=NUM partition pgbench_accounts in NUM parts (default: 0)\n"
- " --partition-method=(range|hash)\n"
+ " --partition-method=range|hash\n"
" partition pgbench_accounts with this method (default: range)\n"
" --tablespace=TABLESPACE create tables in the specified tablespace\n"
" --unlogged-tables create tables as unlogged tables\n"