Re: Improvements and additions to COPY progress reporting

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improvements and additions to COPY progress reporting
Date: 2021-03-15 04:53:43
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 10, 2021 at 09:35:10AM +0100, Matthias van de Meent wrote:
> There are examples in which pg_stat_progress_* -views report
> inaccurate data. I think it is fairly reasonable to at least validate
> some part of the progress reporting, as it is one of the few methods
> for administrators to look at the state of currently running
> administrative tasks, and as such, this user-visible api should be
> validated.

Looking closer at 0002, the size numbers are actually incorrect on
Windows for the second query. The CRLFs at the end of each line of add three bytes to the report of COPY FROM, so this finishes
with 82 bytes for bytes_total and bytes_processed instead of 79.
Let's make this useful but simpler here, so I propose to check that
the counters are higher than zero instead of an exact number. Let's
also add the relation name relid::regclass while on it.

The tests introduced are rather limited, but you are right that
something is better than nothing here, and I have slightly updated
what the tests sent previously as per the attached. What do you

Attachment Content-Type Size
copy-from-report-tests-13.patch text/x-diff 4.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-03-15 05:00:28 Re: Extensions not dumped when --schema is used
Previous Message Pavel Stehule 2021-03-15 04:31:18 Re: pl/pgsql feature request: shorthand for argument and local variable references