Re: Improvements and additions to COPY progress reporting

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: Improvements and additions to COPY progress reporting
Date: 2021-02-23 09:27:24
Message-ID: CAEze2Wj-a_bzDFaza88MvuFuquTQx+R-DOAVmP8vXzfe_vLR+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 22 Feb 2021 at 05:49, Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Mon, Feb 22, 2021 at 12:40 AM Matthias van de Meent
> <boekewurm+postgres(at)gmail(dot)com> wrote:
> >
> > On Sat, 20 Feb 2021 at 07:09, Bharath Rupireddy
> > <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> > >
> > > For COPY TO the name "source_type" column and for COPY FROM the name
> > > "destination_type" makes sense. To have a combined column name for
> > > both, how about naming that column as "io_type"?
> >
> > Thank you, that's way better! PFA what I believe is a finalized
> > patchset v9, utilizing io_type terminology instead of io_target.
>
> Thanks for the patches. I reviewed them.
>
> 0001 - I think there's a bug. See COPY TO stdout doesn't print
> io_type as "STDIO".

Fixed in attached

> 0003 - patch:
> I'm doubtful if the "bytes_total": 79 i.e. test file size will be the
> same across different platforms and file systems types, if true, then
> the below tests will not be stable. Do we also want to exclude the
> bytes_total from the output, just to be on the safer side? Thoughts?

I'm fairly certain that input files of the regression tests are
considered 'binary files' to the test framework and that contents
don't change between different architectures or OSes. I also think
that any POSIX-compliant file system would report anything but the
size of the file contents, i.e. the size of the blob that is the file,
and that is correctly reported here. Other than that, if bytes_total
wouldn't be stable, then bytes_processed wouldn't make sense either.

For STDIN / STDOUT you might also have a point (different input
methods might have different length encodings for the specified
input), but insofar that I understand the test framework and the
expected git configurations, the tests run using UTF-8 / ascii only,
with a single style of newlines[+]. Sadly, I cannot provide examples
nor outputs for other test framework settings due to my lack of
experience with running the tests with non-standard settings.

Note, I'm happy to be proven wrong here, in which case I don't
disagree, but according to my limited knowledge, these outputs should
be stable.

With regards,

Matthias van de Meent

[+] Except when explicitly configured to run using non-standard
configurations, in which case there are different expected output
values to be configured for that configuration.

Attachment Content-Type Size
v10-0001-Add-progress-reported-components-for-COPY-progre.patch application/x-patch 11.9 KB
v10-0002-Add-backlinks-to-progress-reporting-documentatio.patch application/x-patch 7.4 KB
v10-0003-Add-copy-progress-reporting-regression-tests.patch application/x-patch 5.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-02-23 09:32:53 Re: A reloption for partitioned tables - parallel_workers
Previous Message Michael J. Baars 2021-02-23 08:23:21 Re: computing dT from an interval