Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitorprogression of long running SQL queries/utilities - Mailing list pgsql-hackers

From Remi Colinet
Subject Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitorprogression of long running SQL queries/utilities
Date
Msg-id CADdR5nyLEvga4E6n+qvuLnjARnmE8UVxeQ0Hq8WmZoPT62HOzQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitorprogression of long running SQL queries/utilities  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

2017-08-01 19:57 GMT+02:00 Robert Haas <robertmhaas@gmail.com>:
On Tue, Aug 1, 2017 at 12:35 PM, Remi Colinet <remi.colinet@gmail.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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] dubious error message from partition.c
Next
From: Peter Geoghegan
Date:
Subject: [HACKERS] What users can do with custom ICU collations in Postgres 10