From: | Greg Spiegelberg <gspiegelberg(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Gauging progress of COPY? |
Date: | 2022-01-22 16:05:31 |
Message-ID: | CAEtnbpXgiExESPx5Caqp+YEU5cRZ0LUbG6t99p5-hxhoM02Asg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Sat, Jan 22, 2022, 3:09 AM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
>
> On Thu, Jan 20, 2022, 19:01 Wells Oliver <wells(dot)oliver(at)gmail(dot)com> wrote:
>
>> Is there some clever way to gauge the progress of a COPY command? i.e.
>> you know it has 10m rows, but you can't SELECT COUNT(*).
>>
>
>
> If you can open a second connection, you can just query
> pg_stat_progress_copy.
>
If COPY FROM STDIN the client can provide feedback since it is sending line
by line.
If size known...1%...5%...
If number of rows known... 10000... 20000...
I would think even a semi capable bash script could do it.
-Greg
>
From | Date | Subject | |
---|---|---|---|
Next Message | Wells Oliver | 2022-01-22 17:08:31 | Re: Determine potential change in table size after a column dropped? |
Previous Message | Ron | 2022-01-22 13:38:26 | Re: Determine potential change in table size after a column dropped? |