On 6/21/15 9:45 PM, Craig Ringer wrote:
And, I also understood your concern about "CREATE INDEX", but we have no way to get 
progress information of "CREATE INDEX".
>At present, I think it may be good to refer to the same time as estimated time to 
execute "COPY TO".
You could probably get a handwave-quality estimate by looking at the
average column widths for the cols included in the index plus the
number of tuples in the table. It'd be useless for expression indexes,
partial indexes, etc, but you can't have everything...

Jan UrbaƄski demonstrated[1] getting progress stats for long running queries[2] at pgCon 2013. Perhaps some of that code would be useful here (or better yet perhaps we could include at least the measuring portion of his stuff in core... ;)

[1] https://www.pgcon.org/2013/schedule/events/576.en.html
[2] https://github.com/wulczer/pg-progress
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to