diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-19 12:32:42 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-19 12:32:42 -0300 |
commit | 7bafffea647e21864cb857ab5b6fe266f2d0976a (patch) | |
tree | 6bb64ef942fafae48f1b8fba6915bba58fc995f6 /contrib/postgres_fdw/postgres_fdw.h | |
parent | b46d9beb658af7eb4e2a08dfa34206a117c9654f (diff) | |
download | postgresql-7bafffea647e21864cb857ab5b6fe266f2d0976a.tar.gz postgresql-7bafffea647e21864cb857ab5b6fe266f2d0976a.zip |
pgbench: Allow changing weights for scripts
Previously, all scripts had the same probability of being chosen when
multiple of them were specified via -b, -f, -N, -S. With this commit,
-b and -f now search for an "@" in the script name and use the integer
found after it as the drawing probability for that script.
(One disadvantage is that if you have script whose names contain @, you
are now forced to specify "@1" at the end; otherwise the name's @ is
confused with a weight separator. We don't expect many pgbench script
with @ in their names in the wild, so this shouldn't be too serious a
problem.)
While at it, rework the interface between addScript, process_file,
process_builtin, and findBuiltin. It had gotten a bit out of hand with
recent commits.
Author: Fabien Coelho
Reviewed-By: Andres Freund, Robert Haas, Álvaro Herrera, Michaël Paquier
Discussion: http://www.postgresql.org/message-id/alpine.DEB.2.10.1603160721240.1666@sto
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.h')
0 files changed, 0 insertions, 0 deletions