A great first step would be to add elog(INFO,...) in some standardized
format over the wire so that clients can tell what's going on. It could
be triggered by a GUC which is off by default.
-M
On Jul 15, 2006, at 9:10 PM, Greg Stark wrote:
>
> Hannu Krosing <hannu@skype.net> writes:
>
>> Maybe we can show progress indicators in status line (either
>> pg_stat_activity.current_query or commandline shown in ps), like
>>
>> WAITING TO START PHASE 1 - WAITING FOR TRANSACTION XXX TO COMPLETE
>>
>> or
>>
>> INSERTING INDEX ENTRY N OF M
>>
>> changing every few seconds.
>
> Hm. That would be very interesting. I'll say that one of the things
> that
> impressed me very much with Postgres moving from Oracle was the focus
> on
> usability. Progress indicators would be excellent for a lot of
> operations.
>
> That said I'm not sure how much I can do here. For a substantial index
> we
> should expect most of the time will be spent in the tuplesort. It's
> hard to
> see how to get any sort of progress indicator out of there and as long
> as we
> can't it's hard to see the point of getting one during the heap scan
> or any of
> the other i/o operations.
>
> I think it does make sense to put something in current_query
> indicating when
> it's waiting for transactions to end and when it's past that point.
> That's
> something the DBA should be aware of.
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
AgentM
agentm@themactionfaction.com
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬