public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Justin Pryzby <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Josef Šimánek <[email protected]>
Cc: [email protected]
Subject: Re: bug: copy progress reporting of backends which run multiple COPYs
Date: Wed, 8 May 2024 10:12:28 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <ZjoeSq3mgYpl6Dhj@pryzbyj2023>
References: <[email protected]>
	<CAEze2WigStQee9rTzVhwT7HCJRFqKy4pMD1Tf=uF0eXKTezDJA@mail.gmail.com>
	<[email protected]>
	<CAEze2Wg2xbgvC2ZpV4DF9YcKQ20E2E26j_g_aGtq3j1q-sXV+g@mail.gmail.com>
	<ZjoeSq3mgYpl6Dhj@pryzbyj2023>

On Tue, May 07, 2024 at 07:27:54AM -0500, Justin Pryzby wrote:
> This didn't get fixed for v16, and it seems unlikely that it'll be
> addressed in back branches.
> 
> But while I was reviewing forgotten threads, it occurred to me to raise
> the issue in time to fix it for v17.

Thanks for the reminder.

FWIW, I'm rather annoyed by the fact that we rely on the ParseState to
decide if reporting should happen or not.  file_fdw tells, even if
that's accidental, that status reporting can be useful if working on a
single table.  So, shutting down the whole reporting if a caller if
BeginCopyFrom() does not give a ParseState is too heavy-handed, IMO.

The addition of report_progress in the COPY FROM state data is a good
idea, though isn't that something we should give as an argument of
BeginCopyFrom() instead if sticking this knowledge in COPY FROM?

Different idea: could it be something worth controlling with a
query-level option?  It would then be possible to provide the same
level of control for COPY TO which has reporting paths, given the
application control over the reporting even with file_fdw, and store
the value controlling the reporting in CopyFormatOptions.  I am
wondering if there would be a case where someone wants to do a COPY
but hide entirely the reporting done.

The query-level option has some appeal.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
  download

view thread (5+ messages)

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