From: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
---|---|
To: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: adding status for COPY progress report |
Date: | 2022-05-24 19:37:46 |
Message-ID: | CAEze2WgqT3gqj8GfFn6BkibKJhDi=kqxMin8uRnO3-EseW-nFw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 24 May 2022 at 19:13, Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
>
> Hi,
> Please see attached for enhancement to COPY command progress.
>
> The added status column would allow users to get the status of the most recent COPY command.
I fail to see the merit of retaining completed progress reporting
commands in their views after completion, other than making the
behaviour of the pg_stat_progress-views much more complicated and
adding overhead in places where we want the system to have as little
overhead as possible.
Trying to get the status of a COPY command after it finished on a
different connection seems weird, as that other connection is likely
to have already disconnected / started another task. To be certain
that a backend can see the return status of the COPY command, you'd
have to be certain that the connection doesn't run any other
_progress-able commands in the following seconds / minutes, which
implies control over the connection, which means you already have
access to the resulting status of your COPY command.
Regarding the patch: I really do not like that this leaks entries into
all _progress views: I get garbage data from e.g. the _create_index
and _copy views when VACUUM is running, etc, because you removed the
filter on cmdtype.
Also, the added fields in CopyToStateData / CopyFromStateData seem
useless when a pgstat_progress_update_param in the right place should
suffice.
Kind regards,
Matthias van de Meent
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2022-05-24 19:52:02 | Re: ccache, MSVC, and meson |
Previous Message | Andres Freund | 2022-05-24 19:30:59 | Re: ccache, MSVC, and meson |