Re: [Proposal] Progress bar for pg_dump/pg_restore

From: Andres Freund <andres(at)anarazel(dot)de>
To: Taiki Kondo <tai-kondo(at)yk(dot)jp(dot)nec(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <aki-iwaasa(at)vt(dot)jp(dot)nec(dot)com>
Subject: Re: [Proposal] Progress bar for pg_dump/pg_restore
Date: 2015-06-12 13:48:01
Message-ID: 20150612134801.GF28424@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2015-06-12 12:45:50 +0000, Taiki Kondo wrote:
> Design & API
> ------------
> When pg_dump / pg_restore is running, progress bar and estimated time to finish is shown on screen like following.
>
>
> =========> (50%) 15:50
>
> The bar ("=>" in above) and percentage value ("50%" in above) show percentage of progress, and the time ("15:50" in above) shows estimated time to finish.
> (This percentage is the ratio for the whole processing.)
>
> Percentage and time are calculated and shown for every 1 second.
>
> In pg_dump, the information, which is required for calculating percentage and time, is from pg_class.
>
> In pg_restore, to calculate the same things, I want to record total amount of command lines into pg_dump file, thus I would like to add a new element to "Archive" structure.
> (This means that version number of archive format is changed.)

The question is how to actually get useful estimates. As there's no
progress report for indvidiual COPY and CREATE INDEX commands you'll, in
many cases, have very irregular progress updates. In many many cases
most of the time is spent on a very small subset of the total objects.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2015-06-12 13:56:42 Re: On columnar storage
Previous Message Merlin Moncure 2015-06-12 13:42:03 Re: [Proposal] Progress bar for pg_dump/pg_restore