Re: Progress bar updates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Progress bar updates
Date
Msg-id 15132.1153279448@sss.pgh.pa.us
Whole thread Raw
In response to Re: Progress bar updates  (Neil Conway <neilc@samurai.com>)
Responses Re: Progress bar updates  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> I'm not quite sure what you're suggesting; presumably you'd need to open
> another client connection to send the "status report" message to a
> backend (since a backend will not be polling its input socket during
> query execution). That just seems like the wrong approach -- stashing a
> backend's current status into shared memory sounds more promising, IMHO,
> and won't require changes to the FE/BE protocol.

Yeah, I was about to make the same comment.  The new support for query
status in shared memory should make it pretty cheap to update a progress
indicator there, and then it'd be trivial to expose the indicator to
other backends via pg_stat_activity.

Sending the progress info directly to the connected client implies
protocol changes (fairly trivial ones) and client changes (possibly
highly nontrivial ones --- think about how you'd get the info out
through something like a webserver application with multiple layers
of software in the way).  In practice, if a query is taking long
enough for this feature to be interesting, making another connection and
looking to see what's happening is not a problem, and it's likely to be
the most practical way anyway for many clients.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [PATCHES] 8.2 features?
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] 8.2 features?