Re: Gauging progress of COPY?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 22, 2022, 3:09 AM Magnus Hagander <magnus@xxxxxxxxxxxx> wrote:


On Thu, Jan 20, 2022, 19:01 Wells Oliver <wells.oliver@xxxxxxxxx> 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

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux