public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
To: Matthias van de Meent <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Josef Šimánek <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: [email protected]
Subject: Re: bug: copy progress reporting of backends which run multiple COPYs
Date: Fri, 20 Jan 2023 19:28:02 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEze2WigStQee9rTzVhwT7HCJRFqKy4pMD1Tf=uF0eXKTezDJA@mail.gmail.com>
References: <[email protected]>
<CAEze2WigStQee9rTzVhwT7HCJRFqKy4pMD1Tf=uF0eXKTezDJA@mail.gmail.com>
On Sat, Jan 21, 2023 at 01:51:28AM +0100, Matthias van de Meent wrote:
> On Thu, 19 Jan 2023 at 06:47, Justin Pryzby <[email protected]> wrote:
> >
> > pg_stat_progress_copy was added in v14 (8a4f618e7, 9d2d45700).
> >
> > But if a command JOINs file_fdw tables, the progress report gets bungled
> > up. This will warn/assert during file_fdw tests.
>
> I don't know what to do with that other than disabling COPY progress
> reporting for file_fdw, i.e. calls to BeginCopyFrom that don't supply
> a pstate. This is probably the best option, because a table backed by
> file_fdw would also interfere with COPY TO's progress reporting.
>
> Attached a patch that solves this specific issue in a
> binary-compatible way. I'm not super happy about relying on behavior
> of callers of BeginCopyFrom (assuming that users that run copy
> concurrently will not provide a ParseState* to BeginCopyFrom), but it
> is what it is.
Thanks for looking. Maybe another option is to avoid progress reporting
in 2nd and later CopyFrom() if another COPY was already running in that
backend.
Would you do anything different in the master branch, with no
compatibility constraints ? I think the progress reporting would still
be limited to one row per backend, not one per CopyFrom().
--
Justin
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: bug: copy progress reporting of backends which run multiple COPYs
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox