Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good catch. So I will remove start_xact code later. Attached patch removes

Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 4:49 AM, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good

Re: [HACKERS] psql \watch versus \timing

2014-09-04 Thread Michael Paquier
On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good catch. So I will remove start_xact code later. Attached patch removes start_xact from PSQLexec. Nothing negative to say here :) Patch simply

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Michael Paquier
On Mon, Sep 1, 2014 at 11:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: I just tested the patch and this feature works as expected if timing is on and it displays the individual run time of each query kicked by \watch. Note that --echo-hidden does

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Greg Stark
On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated patch correcting the comment problems mentioned by Heikki. I just tried this and found it doesn't cooperate well with AUTOCOMMIT = 'off' and

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark st...@mit.edu wrote: On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated patch correcting the comment problems mentioned by Heikki. Thanks a lot!

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 11:13 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark st...@mit.edu wrote: On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki

Re: [HACKERS] psql \watch versus \timing

2014-09-01 Thread Michael Paquier
On Fri, Aug 29, 2014 at 6:33 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/28/2014 02:46 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: Actually, perhaps it would be

Re: [HACKERS] psql \watch versus \timing

2014-09-01 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: I just tested the patch and this feature works as expected if timing is on and it displays the individual run time of each query kicked by \watch. Note that --echo-hidden does not display the query run during each loop and that this is contrary

Re: [HACKERS] psql \watch versus \timing

2014-08-29 Thread Heikki Linnakangas
On 08/28/2014 02:46 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: Actually, perhaps it would be better to just copy-paste PSQLexec, and modify the copy to suite \watch's needs.

Re: [HACKERS] psql \watch versus \timing

2014-08-28 Thread Fujii Masao
On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/18/2014 10:51 AM, Michael Paquier wrote: On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Fujii Masao
On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/18/2014 10:51 AM, Michael Paquier wrote: On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the short-term. I don't like the name PSQLexecInternal,

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Michael Paquier
On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the query takes if \timing is enabled. I didn't refactor PSQLexec and SendQuery into one routine because the contents of those functions are not so same. I'm

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Fujii Masao
On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the query takes if \timing is enabled. I didn't refactor PSQLexec and

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Michael Paquier
On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the

Re: [HACKERS] psql \watch versus \timing

2014-08-14 Thread Fujii Masao
On Mon, May 20, 2013 at 7:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Janes jeff.ja...@gmail.com writes: I'd like to run same query repeatedly and see how long it takes each time. I thought \watch would be excellent for this, but it turns out that using \watch suppresses the output of

[HACKERS] psql \watch versus \timing

2013-05-19 Thread Jeff Janes
I'd like to run same query repeatedly and see how long it takes each time. I thought \watch would be excellent for this, but it turns out that using \watch suppresses the output of \timing. Is this intentional, or unavoidable? Also, is it just or does the inability to watch more frequently than

Re: [HACKERS] psql \watch versus \timing

2013-05-19 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: I'd like to run same query repeatedly and see how long it takes each time. I thought \watch would be excellent for this, but it turns out that using \watch suppresses the output of \timing. Is this intentional, or unavoidable? \watch uses PSQLexec not