On Wed, Jul 22, 2015 at 3:02 AM, Simon Riggs <si...@2ndquadrant.com> wrote: > For me, the user workflow looks like these.... > > Worried: "Task X is taking ages? When is it expected to finish?" > Ops: 13:50 > <sometime later, about 14:00> > Worried: "Task X is still running? But I thought its ETA was 13:50?" > Ops: Now says 14:30 > Worried: "Is it stuck, or is it making progress?" > Ops: Looks like its making progress > Worried: "Can we have a look at it and find out what its doing?"
How does Ops know that it is making progress? Just because the completion percentage is changing? > In terms of VACUUM specifically: VACUUM should be able to assess beforehand > whether it will scan the indexes, or it can just assume that it will need to > scan the indexes. Perhaps VACUUM can pre-scan the VM to decide how big a > task it has before it starts. Well, we can assume that it will scan the indexes exactly once, but the actual number may be more or less; and the cost of rescanning the heap in phase 2 is also hard to estimate. Maybe I'm worrying over nothing, but I have a feeling that if we try to do what you're proposing here, we're gonna end up with this: https://xkcd.com/612/ Most of the progress estimators I have seen over the ~30 years that I've been playing with computers have been unreliable, and many of those have been unreliable to the point of being annoying. I think that's likely to happen with what you are proposing too, though of course like all predictions of the future it could turn out to be wrong. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers