Re: Improvements and additions to COPY progress reporting

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>, Josef Šimánek <josef.simanek@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-08T08:23:50Z
Lists: pgsql-hackers
On Sun, Mar 07, 2021 at 04:50:31PM +0530, Bharath Rupireddy wrote:
> Attaching remaining patches 0001 and 0003 from the v11 patch
> set(posted upthread) here to make cfbot happier.

Looking at patch 0002, the location of each progress report looks good
to me.  I have some issues with some of the names chosen though, so I
would like to suggest a few changes to simplify things:
- PROGRESS_COPY_IO_TYPE_* => PROGRESS_COPY_TYPE_*
- PROGRESS_COPY_IO_TYPE => PROGRESS_COPY_TYPE
- PROGRESS_COPY_TYPE_STDIO => PROGRESS_COPY_TYPE_PIPE
- In pg_stat_progress_copy, io_type => type

It seems a bit confusing to not count insertions on foreign tables
where nothing happened.  I am fine to live with that, but can I ask if
this has been thought about?
--
Michael

Commits

  1. Add some basic tests for progress reporting of COPY

  2. Add support for more progress reporting in COPY

  3. doc: Add backlinks to progress reporting documentation