Could you tell me why these columns are necessary in *progress* view? If we want to see what copy command is actually running, we can see pg_stat_activity, instead. For example,
SELECT pc.*, a.query FROM pg_stat_progress_copy pc, pg_stat_activity a WHERE pc.pid = a.pid;
If that doesn't make any sense, I can remove those. I have not strong opinion about those values. Those were just around when I was looking for possible values to include in the progress report.
> > > file_bytes_processed - amount of bytes processed when file is used (otherwise 0), works for both direction ( > > FROM/TO) when file is used (file = t) > > What value is reported when STDOUT/STDIN is specified in COPY command? > > > For my first patch nothing was reported on STDOUT/STDIN usage. I'll attach new patch soon supporting those as well.
Thanks for the patch!
With the patch, pg_stat_progress_copy seems to report the progress of the processing on file_fdw. Is this intentional?
Every action using internally COPY will be included in the progress report view.
I have spotted for example pg_dump does that and is reported there as well.
I do not see any problem regarding this. For pg_dump it is consistent with "pg_stat_activity" reporting COPY command in the query field.
Regards,
-- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION