heroku / heroku-pg

this code is now in https://github.com/heroku/cli
ISC License
15 stars 17 forks source link

Feature request: show % progress in cli upon heroku pg:copy command issues #4

Open bestori opened 8 years ago

jdx commented 7 years ago

I was able to add status messages from pg, but as far as I know there is no way to get the progress of a pg backup. Is that right @uhoh-itsmaciek?

msakrejda commented 7 years ago

We could potentially check source size and target size in the backups backend and guesstimate progress with that, and then expose that in the CLI... I think it's potentially doable but it's a bit of a project.

bestori commented 7 years ago

Could I somehow contribute to making this happen? Would gladly do so.

jdx commented 7 years ago

no it would have to include a significant server component

msakrejda commented 7 years ago

You know, thinking about this some more, I think I was wrong: I didn't account for MVCC bloat. Because of that, the source database can be much "larger" than the target (as in, pg_database_size can return wildly inflated values because it counts bloat). I can't think of a way to accurately estimate copy progress without more support from Postgres itself.