Thread

Commits

  1. Provide pgbench --show-script to dump built-in scripts.

  1. pgbench - add option to show actual builtin script code

    Fabien COELHO <coelho@cri.ensmp.fr> — 2019-04-08T15:43:24Z

    Hello devs,
    
    The minor attached patch $SUBJECT, so that it can be inspected easily, 
    instead of having to look at the source code or whatever.
    
       sh> pgbench --list select-only
       -- select-only: <builtin: select only>
       \set aid random(1, 100000 * :scale)
       SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
    
    The builtin list output is also slightly improved:
    
       sh> pgbench -b list
       Available builtin scripts:
             tpcb-like: <builtin: TPC-B (sort of)>
         simple-update: <builtin: simple update>
           select-only: <builtin: select only>
    
    -- 
    Fabien.
  2. Re: pgbench - add option to show actual builtin script code

    Ibrar Ahmed <ibrar.ahmad@gmail.com> — 2019-05-02T13:55:18Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  tested, passed
    Implements feature:       tested, passed
    Spec compliant:           tested, passed
    Documentation:            tested, passed
    
    Patch looks good to me, and work fine on my machine. One minor observation is option 'list' mostly used to list the elements like "pgbench -b list" shows the available builtin scripts. Therefore we should use a word which seems to be more relevant like --show-script.
    
    The new status of this patch is: Waiting on Author
    
  3. Re: pgbench - add option to show actual builtin script code

    Fabien COELHO <coelho@cri.ensmp.fr> — 2019-05-02T14:25:42Z

    Hello,
    
    > Patch looks good to me, and work fine on my machine. One minor 
    > observation is option 'list' mostly used to list the elements like 
    > "pgbench -b list" shows the available builtin scripts. Therefore we 
    > should use a word which seems to be more relevant like --show-script.
    
    Thanks for the review.
    
    Here is a version with "--show-script". I also thought about "--listing", 
    maybe.
    
    > The new status of this patch is: Waiting on Author
    
    -- 
    Fabien.
  4. Re: pgbench - add option to show actual builtin script code

    Ibrar Ahmed <ibrar.ahmad@gmail.com> — 2019-05-02T14:54:38Z

    Now the patch is good now.
    
    The new status of this patch is: Ready for Committer
    
  5. Re: pgbench - add option to show actual builtin script code

    Fabien COELHO <coelho@cri.ensmp.fr> — 2019-05-02T16:35:57Z

    > Now the patch is good now.
    >
    > The new status of this patch is: Ready for Committer
    
    Ok, thanks.
    
    -- 
    Fabien.
    
    
    
    
  6. Re: pgbench - add option to show actual builtin script code

    Andrew Dunstan <andrew.dunstan@2ndquadrant.com> — 2019-07-11T16:04:04Z

    On 5/2/19 12:35 PM, Fabien COELHO wrote:
    >
    >> Now the patch is good now.
    >>
    >> The new status of this patch is: Ready for Committer
    >
    > Ok, thanks.
    >
    
    
    Why aren't we instead putting the exact scripts in the documentation?
    Having to call pgbench with a special flag to get the script text seems
    a bit odd.
    
    
    cheers
    
    
    andrew
    
    
    -- 
    Andrew Dunstan                https://www.2ndQuadrant.com
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
    
    
  7. Re: pgbench - add option to show actual builtin script code

    Fabien COELHO <coelho@cri.ensmp.fr> — 2019-07-11T16:20:14Z

    Hello Andrew,
    
    >>> Now the patch is good now.
    >>>
    >>> The new status of this patch is: Ready for Committer
    >
    > Why aren't we instead putting the exact scripts in the documentation?
    > Having to call pgbench with a special flag to get the script text seems
    > a bit odd.
    
    A typical use case I had is to create a new script by modifying an 
    existing one for testing or debug. I prefer "command > file.sql ; vi 
    file.sql" to hazardous copy-pasting stuff from html pages.
    
    I do not think that it is worth replicating all scripts inside the doc, 
    they are not that interesting, especially if more are added. Currently, 
    out of the 3 scripts, only one is in the doc, and nobody complained:-)
    
    Now, they could be added to the documentation, but I'd like the option 
    anyway.
    
    -- 
    Fabien.
    
    
    
    
  8. Re: pgbench - add option to show actual builtin script code

    Thomas Munro <thomas.munro@gmail.com> — 2019-07-16T00:03:05Z

    On Fri, Jul 12, 2019 at 4:20 AM Fabien COELHO <coelho@cri.ensmp.fr> wrote:
    > >>> Now the patch is good now.
    > >>>
    > >>> The new status of this patch is: Ready for Committer
    > >
    > > Why aren't we instead putting the exact scripts in the documentation?
    > > Having to call pgbench with a special flag to get the script text seems
    > > a bit odd.
    >
    > A typical use case I had is to create a new script by modifying an
    > existing one for testing or debug. I prefer "command > file.sql ; vi
    > file.sql" to hazardous copy-pasting stuff from html pages.
    >
    > I do not think that it is worth replicating all scripts inside the doc,
    > they are not that interesting, especially if more are added. Currently,
    > out of the 3 scripts, only one is in the doc, and nobody complained:-)
    >
    > Now, they could be added to the documentation, but I'd like the option
    > anyway.
    
    Committed, after pgindent.  Thanks Fabien and Ibrar.
    
    -- 
    Thomas Munro
    https://enterprisedb.com
    
    
    
    
  9. Re: pgbench - add option to show actual builtin script code

    Fabien COELHO <coelho@cri.ensmp.fr> — 2019-07-16T07:59:29Z

    > Committed, after pgindent.  Thanks Fabien and Ibrar.
    
    Thanks for the commit.
    
    -- 
    Fabien.