Re: Gauging progress of COPY?

Поиск
Список
Период
Сортировка
От Greg Spiegelberg
Тема Re: Gauging progress of COPY?
Дата
Msg-id CAEtnbpXgiExESPx5Caqp+YEU5cRZ0LUbG6t99p5-hxhoM02Asg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Gauging progress of COPY?  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-admin
On Sat, Jan 22, 2022, 3:09 AM Magnus Hagander <magnus@hagander.net> wrote:


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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: Determine potential change in table size after a column dropped?
Следующее
От: Wells Oliver
Дата:
Сообщение: Re: Determine potential change in table size after a column dropped?