Re: Improvements and additions to COPY progress reporting
Matthias van de Meent <boekewurm+postgres@gmail.com>
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@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-08T16:33:40Z
Lists: pgsql-hackers
Attachments
- v12-0003-Adapt-COPY-progress-reporting-to-report-processe.txt (text/plain)
- v12-0001-Additional-progress-reported-components-for-COPY.patch (text/x-patch) patch v12-0001
- v12-0002-Add-copy-progress-reporting-regression-tests.patch (text/x-patch) patch v12-0002
On Mon, 8 Mar 2021 at 09:24, Michael Paquier <michael@paquier.xyz> wrote: > > 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 Seems reasonable. PFA updated patches. I've renamed the previous 0003 to 0002 to keep git-format-patch easy. > 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? This is keeping current behaviour of the implementation as committed with 8a4f618e, with the rationale of that patch being that this number should mirror the number returned by the copy command. I am not opposed to adding another column for `tuples_inserted` and changing the logic accordingly (see prototype 0003), but that was not in the intended scope of this patchset. Unless you think that this should be included in this current patchset, I'll spin that patch out into a different thread, but I'm not sure that would make it into pg14. With regards, Matthias van de Meent.
Commits
-
Add some basic tests for progress reporting of COPY
- 15639d5e8f6f 14.0 landed
-
Add support for more progress reporting in COPY
- 9d2d45700928 14.0 landed
-
doc: Add backlinks to progress reporting documentation
- 8a8f4d8ede28 14.0 landed