Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-09 Thread Remi Colinet
2017-08-01 19:57 GMT+02:00 Robert Haas : > On Tue, Aug 1, 2017 at 12:35 PM, Remi Colinet > wrote: > > I did it in version 2 of the patch. > > I'am skeptical about the use of JSON, XML, and others in such output. > > > > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? > > I sus

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-02 Thread Adrien Nayrat
On 08/01/2017 06:35 PM, Remi Colinet wrote: > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? Yes : http://tatiyants.com/pev/#/plans :) -- Adrien NAYRAT http://dalibo.com - http://dalibo.org signature.asc Description: OpenPGP digital signature

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Pavel Stehule
2017-08-01 18:35 GMT+02:00 Remi Colinet : > I did it in version 2 of the patch. > The patch could yield TEXT, JSON, and XML ouput. > > For below query, it gives: > > => Terminal 1 > test=# select * from t_10m, t_1m where t_10m.md5 like '%cb%'; > > => Terminal 2 > test=# \watch PROGRESS 9546; >

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Michael Paquier
On Tue, Aug 1, 2017 at 7:17 PM, Andres Freund wrote: > On 2017-08-01 19:11:55 +0200, Michael Paquier wrote: >> I think that Depesz makes use of a non-default format for its >> explain.depesz.com, or he would have a hard time maintaining a >> deparsing API for its application. > > Hm? e.d.c accepts

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 12:35 PM, Remi Colinet wrote: > I did it in version 2 of the patch. > I'am skeptical about the use of JSON, XML, and others in such output. > > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? > I suspect only TEXT format is being used. Do you have any re

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Andres Freund
On 2017-08-01 19:11:55 +0200, Michael Paquier wrote: > I think that Depesz makes use of a non-default format for its > explain.depesz.com, or he would have a hard time maintaining a > deparsing API for its application. Hm? e.d.c accepts the text explain format, so I'm unclear on what you're saying

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Michael Paquier
On Tue, Aug 1, 2017 at 6:35 PM, Remi Colinet wrote: > I'am skeptical about the use of JSON, XML, and others in such output. You should not. > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? > I suspect only TEXT format is being used. I think that Depesz makes use of a non-de

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Remi Colinet
I did it in version 2 of the patch. The patch could yield TEXT, JSON, and XML ouput. For below query, it gives: => Terminal 1 test=# select * from t_10m, t_1m where t_10m.md5 like '%cb%'; => Terminal 2 test=# \watch PROGRESS 9546; Wed 10 May 2017 06:29:59 PM CEST (

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Robert Haas
On Mon, Jul 31, 2017 at 6:10 AM, Pavel Stehule wrote: > you can support XML, JSON output format like EXPLAIN does. > > https://www.postgresql.org/docs/current/static/sql-explain.html +1 for that approach. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Pavel Stehule
2017-07-31 11:09 GMT+02:00 Remi Colinet : > > > 2017-07-26 15:27 GMT+02:00 Robert Haas : > >> On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet >> wrote: >> > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), >> value, >> > unit FROM pg_progress(0,0); >> > pid | ppid | bid |

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Remi Colinet
2017-07-26 16:24 GMT+02:00 Pavel Stehule : > > > 2017-07-26 15:27 GMT+02:00 Robert Haas : > >> On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet >> wrote: >> > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), >> value, >> > unit FROM pg_progress(0,0); >> > pid | ppid | bid |

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Remi Colinet
2017-07-26 15:27 GMT+02:00 Robert Haas : > On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet > wrote: > > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), > value, > > unit FROM pg_progress(0,0); > > pid | ppid | bid | concat | value | unit > > ---+--

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-26 Thread Pavel Stehule
2017-07-26 15:27 GMT+02:00 Robert Haas : > On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet > wrote: > > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), > value, > > unit FROM pg_progress(0,0); > > pid | ppid | bid | concat | value | unit > > ---+--

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-26 Thread Robert Haas
On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet wrote: > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), value, > unit FROM pg_progress(0,0); > pid | ppid | bid | concat | value | unit > ---+--+-+--+--+---