Re: Improvements and additions to COPY progress reporting

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, 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 11:43:40
Message-ID: CAEze2WiufqpP5fD=9DRU3fX=SxM6SjHQyYYzmnJO1=TA5g7bXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 15 Mar 2021 at 05:53, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> 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
> emp.data add three bytes to the report of COPY FROM, so this finishes
> with 82 bytes for bytes_total and bytes_processed instead of 79.

Hmm, does CFBot not run checkout on windows with crlf line endings? I
had expected it to do as such.

> 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.

+1, I hadn't thought of casting relid to its regclass to get a stable
identifier.

> 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
> think?

That seems great, thanks for picking this up.

With regards,

Matthias van de Meent

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-03-15 12:14:33 Re: [HACKERS] Custom compression methods
Previous Message iwata.aya@fujitsu.com 2021-03-15 11:26:43 RE: libpq debug log