Re: [PATCH] Initial progress reporting for COPY command

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: [PATCH] Initial progress reporting for COPY command
Дата
Msg-id 8530185d-4112-0c95-58c2-85b978752009@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: [PATCH] Initial progress reporting for COPY command  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers

On 2020/06/22 21:14, Tomas Vondra wrote:
> On Sun, Jun 21, 2020 at 01:40:34PM +0200, Josef Šimánek wrote:
>> Thanks for all comments. I have updated code to support more options
>> (including STDIN/STDOUT) and added some documentation.
>>
>> Patch is attached and can be found also at
>> https://github.com/simi/postgres/pull/5.
>>
>> Diff version: https://github.com/simi/postgres/pull/5.diff
>> Patch version: https://github.com/simi/postgres/pull/5.patch
>>
>> I'm also attaching screenshot of HTML documentation and html documentation
>> file.
>>
>> I'll do my best to get this to commitfest now.
>>
> 
> I see we're not showing the total number of bytes the COPY is expected
> to process, which makes it hard to estimate how far we actually are.
> Clearly there are cases when we really don't know that (exports, import
> from stdin/program), but why not to show file size for imports from a
> file? I'd expect that to be the most common case.

+1

I like using \copy psql meta command. So I feel better if the total size
is reported even when using \copy (i.e., COPY STDIN).

As just idea, what about adding new option into COPY command,
allowing users (including \copy command) to specify the estimated size
of input file in that option, and making pg_stat_progress_copy view
display it as the total size? If we implement this mechanism, we can
change \copy command so that it calculate the actual size of input file
and specify it in that option.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] Initial progress reporting for COPY command
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Backpatch b61d161c14 (Introduce vacuum errcontext ...)