Re: [HACKERS] pgbench post-connection command

2012-01-13 Thread Simon Riggs
On Thu, Jan 12, 2012 at 8:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 5:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: More like \once ... any SQL command or meta command here ... if we want to extend the scripting language.  But I'd

Re: [HACKERS] pgbench post-connection command

2012-01-13 Thread Greg Smith
There's one part of this that's still fuzzy in the spec I'd like to clarify, if nothing else than for my own memory's sake--as the person most likely to review a random pgbench patch. Simon gave an example like this: pgbench -x SET synchronous_commit = off All are agreed this should take

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: New -x option for pgbench executes the given command once after connection of each session. This seems rather poorly designed, mainly because there's no reason to think that a single command would be sufficient. What would make more sense to me is to

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Alvaro Herrera
Excerpts from Tom Lane's message of jue ene 12 12:26:49 -0300 2012: Simon Riggs si...@2ndquadrant.com writes: New -x option for pgbench executes the given command once after connection of each session. This seems rather poorly designed, mainly because there's no reason to think that a

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Heikki Linnakangas
On 12.01.2012 17:26, Tom Lane wrote: Simon Riggssi...@2ndquadrant.com writes: New -x option for pgbench executes the given command once after connection of each session. If it's just for SET, you could just put the GUCs in postgresql.conf. This seems rather poorly designed, mainly because

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 12.01.2012 17:26, Tom Lane wrote: Simon Riggssi...@2ndquadrant.com writes: New -x option for pgbench executes the given command once after connection of each session. If it's just for SET, you could just put the GUCs in

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Simon Riggs
On Thu, Jan 12, 2012 at 3:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: New -x option for pgbench executes the given command once after connection of each session. This seems rather poorly designed, mainly because there's no reason to think that a single

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 3:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: This seems rather poorly designed, mainly because there's no reason to think that a single command would be sufficient. It supports multiple commands via multi-statement requests

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Simon Riggs
On Thu, Jan 12, 2012 at 4:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 3:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: This seems rather poorly designed, mainly because there's no reason to think that a single command would be

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 4:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't believe that works for multiple \set commands, which is the more likely use-case for this; as noted upthread, executing SET here is quite unnecessary since you can get that

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Simon Riggs
On Thu, Jan 12, 2012 at 5:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: More like \once ... any SQL command or meta command here ... if we want to extend the scripting language.  But I'd be perfectly happy with a command-line switch that specifies a script file to be run once. Once per

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 5:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: More like \once ... any SQL command or meta command here ... if we want to extend the scripting language.  But I'd be perfectly happy with a command-line switch that specifies a script

Re: [HACKERS] pgbench post-connection command

2012-01-12 Thread Heikki Linnakangas
On 12.01.2012 22:04, Tom Lane wrote: Simon Riggssi...@2ndquadrant.com writes: On Thu, Jan 12, 2012 at 5:32 PM, Tom Lanet...@sss.pgh.pa.us wrote: More like \once ... any SQL command or meta command here ... if we want to extend the scripting language. But I'd be perfectly happy with a