Re: pgbench -M option can be specified more than once

2018-11-03 Thread Tatsuo Ishii
> Andres Freund writes: >> On 2018-11-03 10:12:14 +0900, Tatsuo Ishii wrote: >>> One of my colleagues actually believed that if both "-M extended" and >>> "-M prepared" were specified, pgbench runs in mixture of those >>> modes. So I felt avoiding such misunderstanding is more important. > >> I r

Re: pgbench -M option can be specified more than once

2018-11-03 Thread Fabien COELHO
Hello Tatsuo-san, While playing with pgbench, I found multiple "-M query_mode" can be set more than once. As already said by others, the "last one win" is somehow a useful feature, so I'd prefer avoiding erroring out on this one. This could leave: (1) improving pgbench doc by spelling ou

Re: pgbench -M option can be specified more than once

2018-11-02 Thread Tom Lane
Andres Freund writes: > On 2018-11-03 10:12:14 +0900, Tatsuo Ishii wrote: >> One of my colleagues actually believed that if both "-M extended" and >> "-M prepared" were specified, pgbench runs in mixture of those >> modes. So I felt avoiding such misunderstanding is more important. > I regularly

Re: pgbench -M option can be specified more than once

2018-11-02 Thread Andres Freund
Hi, On 2018-11-03 10:12:14 +0900, Tatsuo Ishii wrote: > > Tatsuo Ishii writes: > >> While playing with pgbench, I found multiple "-M query_mode" can be > >> set more than once. For example, > > > > I think that's true of just about every option in all of our programs. > > Why is this one instanc

Re: pgbench -M option can be specified more than once

2018-11-02 Thread Isaac Morland
In many cases, it is handy to be able to specify an option in an alias, but still be able to override on the actual command line. I can't say whether that is useful with this specific option, but it seems the same debate could be had about almost any option. I'm pretty sure the existing behaviour

Re: pgbench -M option can be specified more than once

2018-11-02 Thread Tatsuo Ishii
> Tatsuo Ishii writes: >> While playing with pgbench, I found multiple "-M query_mode" can be >> set more than once. For example, > > I think that's true of just about every option in all of our programs. > Why is this one instance so much worse than others that it deserves > to be handled differ

Re: pgbench -M option can be specified more than once

2018-11-02 Thread Tom Lane
Tatsuo Ishii writes: > While playing with pgbench, I found multiple "-M query_mode" can be > set more than once. For example, I think that's true of just about every option in all of our programs. Why is this one instance so much worse than others that it deserves to be handled differently?

pgbench -M option can be specified more than once

2018-11-02 Thread Tatsuo Ishii
While playing with pgbench, I found multiple "-M query_mode" can be set more than once. For example, $ pgbench -p 11002 -M extended -S -M prepared test starting vacuum...end. transaction type: scaling factor: 1 query mode: prepared number of clients: 1 number of threads: 1 number of transactions