Re: pgbench stats per script & other stuff

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgbench stats per script & other stuff
Дата
Msg-id 20150722192651.GO5596@postgresql.org
обсуждение исходный текст
Ответ на Re: pgbench stats per script & other stuff  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Fabien COELHO wrote:
> 
> >>[...] and that a subsequent -w modifies the meaning of the
> >>script-specifiying argument already read. That strikes me as a very
> >>unintuitive interface.
> >
> >Ok, I understand this "afterward modification" objection.
> >
> >What if the -w would be required *before*, and supply a weight for (the
> >first/maybe all) script(s) specified *afterwards*, so it does not modify
> >something already provided? I think it would be more intuitive, or at
> >least less surprising.
> 
> Here is a v3 which does that. If there is a better idea, do not hesitate!

This seems a moderately reasonable interface to me.  There are other
programs that behave in that way, and once you get used to the idea, it
makes sense.

I think for complete consistency we would have to require that -w is
specified for all scripts or none of them.  I am not sure if this means
that it's okay to have later scripts use a weight specified for a
previous one (i.e. it's only an error to fail to specify a weight for
options before the first -w), or each -f must have always its own -w
explicitely.  In other words,   pg_bench -w2 -f script1.sql -f script2.sql
either script2 has weight 2, or it's an error, depending on what we
decide; but   pg_bench -f script1.sql -w 2 -fscript2.sql
is always an error.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jaimin Pan
Дата:
Сообщение: Re: [BUGS] object_classes array is broken, again
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Volatility of pg_xact_commit_timestamp() and pg_last_committed_xact()