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

From: Remi Colinet <remi(dot)colinet(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities
Date: 2017-08-09 21:03:58
Message-ID: CADdR5nyLEvga4E6n+qvuLnjARnmE8UVxeQ0Hq8WmZoPT62HOzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-08-01 19:57 GMT+02:00 Robert Haas <robertmhaas(at)gmail(dot)com>:

> On Tue, Aug 1, 2017 at 12:35 PM, Remi Colinet <remi(dot)colinet(at)gmail(dot)com>
> 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 reason to suspect that others aren't being used? The
> default format for anything is likely to be the most commonly-used
> one, but I don't think that proves the others are unused.
>
> Even if it were true, it wouldn't be a good justification for
> inventing an entirely new machine-readable format, at least not IMHO.
>

In version 3, my idea was to use a similar output as the one used for
Ora..e database with the v$session_longops dynamic table.
May be this is not such a good idea then. Though, it seems very handy at
1st sight.

I can revert to TEXT, JSON, XML and YAML. I will need to modify EXPLAIN
code in order to share some common parts for output formatting. Basically,
this would not change the code of EXPLAIN unless than moving some functions
in a pg_report.c file and with function names starting by ReportXXX instead
of ExplainXXX . Duplicating code for such output is not an option.

Rgds

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-08-09 21:26:01 Re: Crash report for some ICU-52 (debian8) COLLATE and work_mem values
Previous Message Tom Lane 2017-08-09 20:59:21 Re: dubious error message from partition.c